FileDocCategorySizeDatePackage
AddingClone.javaAPI DocExample3952Mon Apr 06 18:10:22 BST 1998None

Int2

public class Int2 extends Object implements Cloneable

Fields Summary
private int
i
Constructors Summary
public Int2(int ii)

 i = ii; 
Methods Summary
public java.lang.Objectclone()

    Object o = null;
    try {
      o = super.clone();
    } catch (CloneNotSupportedException e) {
      System.out.println("Int2 can't clone");
    }
    return o;
  
public voidincrement()

 i++; 
public java.lang.StringtoString()

    return Integer.toString(i);