• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2836
  • Last Modified:

What are the difference between folder, package, directory.


I would like to know "What are the dfifferences between folder, package, directory" used in RAD, Eclipse etc IDEs.
When do we use which one and why?.

If I create a folder ( say com then subfolder in it as com.xyz then subfolder within that as com.xyz.abc)within java source directory and create java classes(say test1.java, test2.java) within that IDE,
 IDE does not recognize those Java files.

Whereas  If i create as package like
com.xyz.abc etc and create java files then only IDE recognizes.

What are the difference between folder, package, directory.
Any ideas, suggestions, resources, links highly appreciated.
3 Solutions
they are the same. no difference actually. but if you create a folder/directory under a "source folder" , usually is "src" then it is known as package. this is conceptually  but in real the packages are the same folder. if you create a folder outside of a source folder it is called folder or directory. Hope I could help you
Sathish David Kumar NCommented:
Sathish David Kumar NCommented:
Packages are nothing more than the way we organize files into different directories according to their functionality
package is a way to make java class unique to your company (it is especially usefull if you are creating reusable code by other companies).
Folder and directory are the same
gudii9Author Commented:
thank you very much

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now