Let me rephrase the question..
Lets say there is a hierarchy..Employee<---Manager<---SalesManager & there is some other class say
Test(Nothing to do with Employee Hierarchy)..right?
so i want one property (Userdefined..say ".base")
So that if i use this property for all the Four classes (& any other class i write later on )then it should display me their individual Super class name
See the code
System.out.println(Employee.base); //should print Object
System.out.println(Manager.base); //should print Employee
System.out.println(Manager.base); //should print Employee
System.out.println(Test.base); //should print Object
You could say this could be done through other mechanism..
Is this not similar to .length for array (of primitive or any object) & .class (for any class & interface)..a generic one...now there will be some code executed by JVM to find out the length of array & to load a specific class & Interface in memory.................question is How many such properties are existing & can i write my own (as in above example)?
Shrinivas