class Test { 
    int a,b; 
    Test(int i,int j) { 
        a = i; 
        b = j; 
    } 
    // һ
    void method(Test ob) { 
        ob.a = ob.a+10; 
        ob.b = ob.b-10; 
    } 
} 
 
public class CallByReference { 
        public static void main(String args[]) { 
        Test object = new Test(25,30); 
        System.out.println("ǰobject.aobject.bֵ:" +object.a + " " + object.b); 
        object.method(object); 
        System.out.println("úobject.aobject.bֵ:" +object.a + " " + object.b); 
    } 
} 
