These are three codes take from John Meyer's Mock.
All the code are similiar and all of them give a Compile time error.
This code says it does not compile at 2. List is required ( I agree!)
In this code the answer mentioned is A List<?> is expected so it can be any Object.
Does this mean - it again does not compile because an ArrayList is returned and not a List.
OR does it mean that if it returned a List of anytype it would have compiled.
( I am still confused with the T type ...)
In this code it simply mentions that it does not compile because of line 2.
IS because it returns and ArrayList and not List.
Or is it because of it returns an ArrayList<
String> type.
Still Struggling with Generics