Zeiger/Verweise in Java?

static class T { int foo = 8; }
public static void main (String [] args) {
    T x = new T ();
    System.out.println ( x.foo );
    T y = x;
    y.foo = 9;
    System.out.println ( x.foo );
}



Johannes Waldmann 2007-01-23