What is difference between the following in java :
Object
Reference ID
Reference Variable
When I see sta
I just made a program for displaying reference ID of an object.
class abc
{
int a=10;
int b;
}
class t extends abc
{
public static void main(String args[])
{
abc A=new abc();
System.out.println(""+A);
}
}
output : shockingly a hex string :
"abc@52e922"
Java maps the actual location of an object at a separate place in form of a hex string which is known as reference ID. It never displays actual location of it's object stored in the memory.