Generics is really interesting.I have noticed one interesting thing about generics,for solving another post in this forum,i wrote the below code.
the T is decided in method1() based on the return type. But the T is decided in method2() based on parameter passed to the method. I think the reason for this is in method1() I am using wild card ?.so parameter can not decide what T is.
Please correct me if I am wrong.
SCJP 1.5 94%.
The greatest glory in living lies not in never falling, but in rising every time we fall.