SCJP 6,SCWCD 5,SCBCD 5
Failure is not an option.
SCJP 6,SCWCD 5,SCBCD 5
Failure is not an option.
Siva Masilamani wrote:But my doubt is when invoking the method i pass the reference to a type A<Integer> so i thought the generic type T inside the method would be considered as Integer,so that the method will throw error.I thought since T is considered as Integer then T extends E would fail ,but the following method compiles successfully.
SCJP 6,SCWCD 5,SCBCD 5
Failure is not an option.
Siva Masilamani wrote:Henry,Leandro
Are you able to find the reason why it compiles ?
SCJP 6,SCWCD 5,SCBCD 5
Failure is not an option.
SCJP 6,SCWCD 5,SCBCD 5
Failure is not an option.
in this sentance whatever is in argument A<----T---> relates to leftside <T extends E> but only and only for class "A"
SCJP 6,SCWCD 5,SCBCD 5
Failure is not an option.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. |