MyClasspublic class MyClass extends Object
Fields Summary |
---|
static final int | MAXX | static final int | MAXY | int | x | int | y |
Constructors Summary |
---|
MyClass(int x, int y)Construct a MyClass with x and y values // current location
this.x = x;
this.y = y;
| MyClass()Construct a MyClass with default values
this(MAXX/2, MAXY/2); // Use the constructor above
|
Methods Summary |
---|
public static void | main(java.lang.String[] av)Test main program
System.out.println(new MyClass(300,100));
System.out.println(new MyClass());
| public java.lang.String | toString()
return "[" + x + "," + y + "]";
|
|