• Post Reply Bookmark Topic Watch Topic
  • New Topic

Is this Generics model answer correct

sam Asare
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Studying for SCJP5 using Sierra/Bates book.

In generics end of ch question 16 has the answer as below. However I am not sure its correct.

public static <E extends Number> List<? super E> process(List <E>

//if you want to invoke the method like this

output=process(input)//will this invocation work with the above 2 lines?

//I thought the process method requires a list as input.
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!