Can anybody explain to me the concept of the toString() method, defined in the Object class? How is it used, and what is its purpose?
toString()
Object
Apart from what cletus answered with regards to debugging, it is used whenever you output an object, like when you use
System.out.println(myObject);
or
System.out.println("text " + myObject);