1 package test4; 2 3 public class NewRemover { 4 static NewRemover obj = new NewRemover(7); 5 int value; 6 static int value2 = 5; 7 NewRemover()8 public NewRemover() { 9 this(3); 10 } 11 NewRemover(int k)12 public NewRemover(int k) { 13 value = k; 14 } 15 run()16 public int run() { 17 return make(); 18 } 19 make()20 public int make() { 21 NewRemover nr = new NewRemover(value2 > 0 ? 3 : 0); 22 return nr.value; 23 } 24 make2(int z)25 public static NewRemover make2(int z) { 26 System.out.println("make2 " + z); 27 obj.value += z; 28 return obj; 29 } 30 } 31