Vishal Sharma :
I have written the following code:-
Test ob = new Test();
System.out.println(ob.toString());
System.out.println(ob.hashCode());
and the output is
Test@15db9742
366712642
i understand that the second value is the hashcode of the object and it is an integer value but i am not able to understand what is the first value. If it is the hashcode of the object then how can it be string and not integer
RAJO SINGH :
It represents classname@HashCode_in_Hexadeciaml_form. So, the string which you are seeing is actually the hexadecimal form of the integer hashcode