1 package test1; 2 3 public class Proceed2 { Proceed2()4 public Proceed2() { i = 3; } 5 6 public int i; 7 p()8 public void p() {} 9 k1()10 public int k1() { 11 Proceed2 p2 = new Proceed2(); 12 boolean b = p2 instanceof Proceed2; 13 Object obj = p2; 14 Proceed2 q2 = (Proceed2)obj; 15 p2.p(); 16 i = 2; 17 return i; 18 } 19 k2()20 public int k2() { 21 Proceed2 p2 = new Proceed2(); 22 p2.p(); 23 i = 2; 24 return i; 25 } 26 } 27