All about Java String.
Tostring() method is implemented by all java objects that will be returning String object, which will be describing that object in a best manner. For instance, red colored object can be printed out by using: Java Code: Color color = new Color( 255, 0, 0 ); String colorStr = color.toString(); Console.println( colorStr ); Printout will be: Java Code: java.awt.Color[r=255,g=0,b=0] In such a case, there is no need to call tostring() method explicitly. ...
Color color = new Color( 255, 0, 0 ); String colorStr = color.toString(); Console.println( colorStr );
java.awt.Color[r=255,g=0,b=0]
License4J 4.0
Today, 12:23 AM in Java Software