Is it possible that following code prints "false"?
If it is possible that object of type Class may be loaded then unloaded and then reloaded during execution of program then this could print false ?
Is the situation same in android and "normal java" ?
class Person
{
Integer age;
Person(Integer age) {this.age=age;}
}
int v1;
{
Person p1 = new Person(5);
v1 = System.identityHashCode(p1.getClass());
}
.
.
int v2;
{
Person p2 = new Person(10);
v2 = System.identityHashCode(p2.getClass());
}
if (v1 == v2)
System.out.println("true");
else
System.out.println("false");