File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Class Heararchi Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Class Heararchi" Watch "Class Heararchi" New topic
Author

Class Heararchi

ankur rathi
Ranch Hand

Joined: Oct 11, 2004
Posts: 3830
What should be the herarchi of a Java Class
1] project
2] package // optional
3] folders // optional
4] classes , interfaces

Is this right ?

'No modifier' means accessable in package only not outside the package .
Is they r accessible out side the folder but inside the package .
should be ...

Thanks for reading . If any thing wrong or you know somrthing more & that is important then please post ..
Mike Gershman
Ranch Hand

Joined: Mar 13, 2004
Posts: 1272
A package can contain multiple classes and interfaces.

A folder can contain multiple packages, but folders are more an operating system concept. The only Java piece is that the classes and interfaces in a package should reside a folder whose name derives from the package name.

Project is not a Java concept, but it is important in IDE's like NetBeans 4.0. I think a project can contain multiple packages, but that depends on the IDE.


Mike Gershman
SCJP 1.4, SCWCD in process
Mike Gershman
Ranch Hand

Joined: Mar 13, 2004
Posts: 1272
'No modifier' means accessable in package only not outside the package.

yes

Is they r accessible out side the folder but inside the package.

No classes or interfaces inside a package should be outside the folder whose name is derived from the package name.


Please avoid IM slang like "r" for "are". Perfect English grammar is not important, but many people who are just learning both English and Java find these strange abbreviations very confusing. Thank you. Mike
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Class Heararchi
 
Similar Threads
Package Description
interface within class or interface
How to use package?
calling java files from jsp page
create jar problem: jarFile.jar: no such file or directory