No. It has to return a String.
A valid toString() method would
public String toString()
{
String str = "Tom";
return str;
}
Type: Posts; User: javapenguin
No. It has to return a String.
A valid toString() method would
public String toString()
{
String str = "Tom";
return str;
}