The toString() method returns the String representation of the object . If you print any object, Java compiler internally invokes the toString() method on the object.
The toString() method returns the String representation of the object . If you print any object, Java compiler internally invokes the toString() method on the object.