class Ints3 { // A demonstration of IntObjs public static void main(String[] args) { IntObj a = new IntObj(3), b = new IntObj(4), c = new IntObj(5), d; System.out.println(); System.out.println("a = "+a.value()); System.out.println("b = "+b.value()); System.out.println("c = "+c.value()); System.out.println(); System.out.println("Executing c.add(a)"); c.add(a); System.out.println("a = "+a.value()); System.out.println("b = "+b.value()); System.out.println("c = "+c.value()); System.out.println(); System.out.println("Executing d = IntObj.add(a,b) "); d = IntObj.add(a,b); System.out.println("a = "+a.value()); System.out.println("b = "+b.value()); System.out.println("c = "+c.value()); System.out.println("d = "+d.value()); System.out.println(); } }