1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
package test3; public class ReplaceNew { public ReplaceNew() {} public ReplaceNew(String s) {} int i = 0; public int run() { i = 3; ReplaceNew s = new ReplaceNew(); new ReplaceNew(); return i; } static int j = 0; public int run2() { new ReplaceNew(new String("test")); return j; } }