wood burning stoves 2.0*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Class relationship Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Class relationship" Watch "Class relationship" New topic
Author

Class relationship

Yi Meng
Ranch Hand

Joined: May 07, 2003
Posts: 270

Can anyone comments on this diagram in terms of correctness and clarity?
key point:
is TopLevel Nested Class(static nested class) belong to the group TopLevel Class?
or
A top level class is a class this is not a nested class. is it true?


Meng Yi
Alton Hernandez
Ranch Hand

Joined: May 30, 2003
Posts: 443
This is how I would classify them:

- Top-Level Class:
--- Nested Class
------- Member Class:
---------- Static Member Class
---------- Non-static Member Class
------- Inner Class
---------- Non-static Member Class
---------- Local Class
---------- Anonymous Class

[ June 19, 2003: Message edited by: Alton Hernandez ]
[ June 19, 2003: Message edited by: Alton Hernandez ]
Marlene Miller
Ranch Hand

Joined: Mar 05, 2003
Posts: 1391
Can anyone comments on this diagram in terms of correctness and clarity?

Yi Meng, static nested classes are always *member* classes. Can you show that in your diagram?
is TopLevel Nested Class(static nested class) belong to the group TopLevel Class?

top-level nested is not defined in the second edition of the JLS. A static class is a nested class that is not an inner class, as you have shown it.
A top level class is a class this is not a nested class. is it true?
Yes, that is the way it is defined in the JLS.
I draw a hierarchy, but exclude the word inner class. I use only all-classes, top-level, nested, member, static, non-static, local, and anonymous. Then I encircle those that are also inner classes.
[ June 19, 2003: Message edited by: Marlene Miller ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Class relationship