ToStringWithpublic class ToStringWith extends Object
Constructors Summary |
---|
public ToStringWith(int anX, int aY)Simple constructor
x = anX; y = aY;
|
Methods Summary |
---|
public static void | main(java.lang.String[] args)Main just creates and prints an object
System.out.println(new ToStringWith(42, 86));
| public java.lang.String | toString()Override toString
return "ToStringWith[" + x + "," + y + "]";
|
|