Override tosting() method is calling when we need to mere mortal to be able to read something meaningful about the objects of our class.Code can call toString() on our object when it wants to read useful details about our object.for the example we have a example :
public class HardToRead {
public static void main (String [] args) {
HardToRead h = new HardToRead();
System.out.println(h);}
}
By:umang
Date:2013-03-09 00:00:00
Overriding hashCode() and equals()
What It Means if we Don\'t Override equals()
Implementing an equals() Method
So What Do we Do with a Collection?
Key Interfaces and Classes of the Collections Framework
Overview of Memory Management and Garbage Collection
Overview of Java\'s Garbage Collector
When Does the Garbage Collector Run?
How Does the Garbage Collector Work?
Reassigning a Reference Variable