If you create a generic class in Java (the class has generic type parameters), can you use generic methods (the method takes generic type parameters)?
Consider the f
With Java Generics, if you use the raw form of a generic class, then all generics on the class, even unrelated generic methods such as your makeSingletonList and doSomething methods, become raw. The reason as I understand it is to provide backwards compatibility with Java code written pre-generics.
If there is no use for your generic type parameter T, then simply remove it from MyGenericClass, leaving your methods generic with K. Else you'll have to live with the fact that the class type parameter T must be given to your class to use generics on anything else in the class.