String Conversion and toString() method in Java? toString() method
Java String Handling
The toString() method is used to returns a string representing the value of an object.
Every class implements toString because it is defined by Object.
The syntax is as follows:
toString()Method
What is the Syntax of Object class toString() method
/* Syntax of Object class toString() method*/
public String toString()
{
return getClass().getName()+"@"+Integer.toHexString(hashCode());
}