where is ".class" declared in java? -


this question has answer here:

i noticed can create class (let's myclass) ,

class = myclass.class 

myclass extends object class, checked documentation of object class, not find field named "class". field comming from?

it's called "class literal" , it's formally defined in this section of java language specification:

a class literal expression consisting of name of class, interface, array, or primitive type, or pseudo-type void, followed '.' , token class.

it expression, class keyword not represent type member.