class FinalSimpleObject {

	private int value;
	
	public final int getValue() {
		return this.value;
	}
	
	public final void setValue(int value) {
		this.value = value;
	}
	
	public String toString() {
		return Integer.toString(this.value);
	}

}

public class Test3b {

	public static void main (String[] args) {
	
		int max = 100000000;
		if (args.length>0) {
			try {
				max = Integer.parseInt(args[0]);
			} catch (Exception e) {
				System.err.println("Bag args : " + args[0] + " (ignored).");
			}
		}
	
	
		System.out.println("Test3b :: Les accesseurs/mutateurs (final)");
		System.out.println(System.getProperty("java.vm.name") + " "
			+ System.getProperty("java.vm.version") + " ("
			+ System.getProperty("java.vm.vendor") +").");
		
		System.out.println();
		
		
		
		long start = System.currentTimeMillis();
		System.out.println("Iteration  : " + max);
		FinalSimpleObject object = new FinalSimpleObject();
		for (int i=0; i<max; i++) {
			object.setValue( i + object.getValue() );
		}
		System.out.println("Resultat   : " + object);
		long end = System.currentTimeMillis();
		
		System.out.println();
		System.err.print("PROCESS TIME : " + (end-start) + " ms");
	}
}