/* This class along with IncrementClassUser demonstrate the difference between * passing a primitive datum and an object as a parameter, and what can happen * in the method invoked which alters the object and the primitive parameters */ public class IncrementClass { private int x; // a datum to be manipulated public IncrementClass(int value) { // constructor to initialize the datum x = value; } public void inc( ) // simple method that will alter this object's instance datum { x++; } public int getValue( ) { // accessor return x; } }