class WithGenerics { public static String foo1() { A x = new A("OK"); return x.toString(); } public static String foo2() { A x = new A(123); return x.toString(); } }