Name: Anonymous 2007-01-25 3:56
I'm having a really hard time using generics in Java. Why are they so damn confusing? Real generics aren't this hard. Can someone break this down and explain this to me?
template<class T> T* single(T a) {
T* l = new T[1];
l[0] = a;
return l;
}
<T> T[] single(T a) {
T[] l = new T[1];
l[0] = a;
return l;
}