我想在java中创建一个Generics Type对象.请建议我如何实现同样的目标.
注意:这似乎是一个微不足道的泛型问题.但我敢打赌......事实并非如此.:)
假设我有类声明:
public class Abc<T> {
public T getInstanceOfT() {
// I want to create an instance of T and return the same.
}
}
Run Code Online (Sandbox Code Playgroud)