toString()



My understanding so far for toString is a method to return value that holding by toString() method.

For example,



double a = 12;
public double toString();
return a;

public double toString(double toS);
return toS;


System.out.println();
System.out.println(50);


-- output--

12
50

Comments

Popular Posts