// MyGenericType.java public class MyGenericType { public MyGenericType(final T value) { this.value = value; } public T GetValue() { return value; } public void SetValue(final T value) { this.value = value; } private T value; } // TestGenericType.java public class GenericTypeTest { public static void main(String[] args) { MyGenericType aGenericInstance = new MyGenericType(1); MyGenericType> anotherGenericInstance = new MyGenericType>(aGenericInstance); System.out.println(aGenericInstance.getClass().getName()); System.out.println(anotherGenericInstance.getClass().getName()); } } // Salida [abarto@viper java]$ java GenericTypeTest MyGenericType MyGenericType