SCJP 1.5 | SCWCD 5.0 |SCBCD
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
SCJP 1.5 | SCWCD 5.0 |SCBCD
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
consider Class A
Then there will be one class that is instance of Class such as A.class that represents the class A
at runtime
Class is instance of Object and Object will be instance of Class and A will have Object and Class as superclass
but what i noticed
is Object.class isInstance Class.class is true
and CLass.class isInstance Object.class is true
we generally refers static field by class name
then i do not found class in Class further as per java's naming convention we can not use keywords for varible name
so i dint get what is eactly .class(i am not talking about .class file ) and where did it come from
SCJP 1.5 | SCWCD 5.0 |SCBCD
SCJP 1.5 | SCWCD 5.0 |SCBCD
but what is the relation ship between ANYCLASS and Class at compiletime and runtime?
1>Does Class becomes superclass for ANYCLASS at runtime?
SCJP 1.5 | SCWCD 5.0 |SCBCD
but what is the relation ship between ANYCLASS and Class at compiletime and runtime?
1>Does Class becomes superclass for ANYCLASS at runtime?
because
is Object.class isInstance Class.class is true
and CLass.class isInstance Object.class is true
SCJP 1.5 | SCWCD 5.0 |SCBCD
rajesh tarte wrote:
Does that mean ANYCLASS.class is instance of CLASS/Object/ANYCLASS?
Thanks henry
No matter. Try again. Fail again. Fail better. This time, do it with this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
|