simply I think standard toString() method is called.
I think that returning className+@+HEX of the hash code was an implementation choice since Java 1.0, a way to return a string without a meaning but at least with a semantic....
You can look at official Java documentation, there's explained how default toString() works.
Thanks Paul and Claude for the reply I know if we override the toString() as per our requirement ....
But I need to know how its actually work behind the back , when the method is not overridden , you can say its just my curiosity ..
regards,
Satya
S Majumder
Ranch Hand
Joined: Jun 03, 2009
Posts: 243
posted
0
Gaurangkumar Thanks a lot ,,, for the link .
-Satya
Gaurangkumar Khalasi
Ranch Hand
Joined: Jun 02, 2012
Posts: 186
posted
0
S Majumder wrote:Gaurangkumar Thanks a lot ,,, for the link .
S Majumder wrote:But I need to know how its actually work behind the back , when the method is not overridden , you can say its just my curiosity ..
Well, it looks like Gaurangkumar Khalasi has explained that. As for your curiosity, that's all very well, but if you also have the goal of being a Java programmer, then in my opinion you're wasting your time with all of these questions you are posting here.
If you want to see how a method such as Object.toString() is implement, then you can lookup the source code - you can find it in the file src.zip which is in your JDK installation directory.