tostring javadoc code example
Example 1: tostring method in java
public class Test {
public static void main(String args[]) {
Integer x = 5;
System.out.println(x.toString());
System.out.println(Integer.toString(12));
}
}
Example 2: javadoc reference general toString
/**
* This javadoc text will reference Object's
* {@link java.lang.Class#toString()} method.
*/
// Output in Javadoc:
// This javadoc text will reference Object's Class.toString() method.