1 package test3; 2 3 interface ErasureGet<T> { get()4 T get(); 5 } 6 7 public class Erasure<T> { 8 T value; Erasure(T t)9 public Erasure(T t) { value = t; } Erasure()10 public Erasure() { value = null; } run()11 public int run() { 12 @SuppressWarnings("unchecked") 13 ErasureGet<String> obj = (ErasureGet<String>)new Erasure<String>("1234"); 14 return obj.get().length(); 15 } 16 } 17