• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Is this Generics model answer correct

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
ArrayList<Integer>input=null
List<Integer>output=null

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

//I thought the process method requires a list as input.
reply
    Bookmark Topic Watch Topic
  • New Topic