FileDocCategorySizeDatePackage
Immutable1.javaAPI DocExample3065Mon Apr 06 18:10:22 BST 1998None

Immutable1

public class Immutable1 extends Object

Fields Summary
private int
data
Constructors Summary
public Immutable1(int initVal)

    data = initVal;
  
Methods Summary
static voidf(Immutable1 i1)

    Immutable1 quad = i1.quadruple();
    System.out.println("i1 = " + i1.read());
    System.out.println("quad = " + quad.read());
  
public static voidmain(java.lang.String[] args)

    Immutable1 x = new Immutable1(47);
    System.out.println("x = " + x.read());
    f(x);
    System.out.println("x = " + x.read());
  
public booleannonzero()

 return data != 0; 
public Immutable1quadruple()

    return new Immutable1(data * 4);
  
public intread()

 return data;