Java generics why this won't work
- by gotch4
I was writing something using generics and to my surprise I found that this doesn't work:
class foo<T>{
T innerT = new T();
}
So can't I instantiate the genericized type? Aren't there any ways to do this?