KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have the following code but i am confused with all the generics. public static <T> List<T> backwards (List<? super T> input) { List<T> output = new ArrayList<T>(); return output; } My understanding is that I have a public method named backwards which creates an arraylist implementing the List interface and returning the arraylist. My question is what actually I am saying to the compiler with the following part...... static <T> List<T> backwards (List<? super T> input)
Tags (comma-separated)
Save Edits
Cancel