Let\'s say we have a class:
class Class1
{
int i = 1;
}
and we have a variable:
Class1 ob1 = new Class1();
Answering your question:
No, it doesn't. Reference is just a reference, i.e. some address in heap, where corresponding object is stored. There is no need to store duplicate information about reference type in reference itself, because actually real variable, which contains its reference address could be of various class types.
Very strange question. Of course, yes, it does. Furthermore, this "part of heap" is an object, which contains this particular class description. Any Class
object contains information about full name of that class, which is described by it.
It is not defined as how it looks logically, if you mean its structure:
2.7 Representation of Objects:
The Java virtual machine does not mandate any particular internal structure for objects.
But if we are talking about information about class type - yes, it is just a String
object, because "type" of Class
object (which it is represent) is just a name of corresponding class.