when i try to compile and run above code it prints "Confusion" as output.
As we all know if you try to print any class object in
java it should print "objectname@some hascode" .
I found above code in one mock
test which says it would call toString method .....but why why why???
i am really confused with this behaviour of compiler....can any one please explain in details ....what is going on here.....
Thanks in advance.