// Burton Rosenberg // Wed Feb 11 11:22:28 EST 1998 // MyFirstObject.java /* EXAMPLE RUN appomattox> javac MyFirstObject.java appomattox> java MyFirstObject 1 3 appomattox> */ class MyFirstObject { public static void main( String [] argv ) { TheObject o1, o2 ; o1 = new TheObject() ; o2 = new TheObject() ; o1.setValue(1) ; o2.setValue(3) ; o1.printValue() ; o2.printValue() ; } } class TheObject { int theHiddenValue ; void printValue() { System.out.println(theHiddenValue) ; } void setValue(int newValue) { theHiddenValue = newValue ; } }