wood burning stoves 2.0*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes please explain this!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "please explain this!!" Watch "please explain this!!" New topic
Author

please explain this!!

manny singh
Greenhorn

Joined: Jan 18, 2008
Posts: 28
??page 620 question 16??

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

A programmer wants to use this method like this:

// INSERT DECLARATIONS HERE
output = process(input);

which pairs of declarations could be placed at // INSERT DECLARATIONS HERE to allow code to compile?(Choose all to apply)

B. ArrayList<Integer> input=null;
List<Integer> output=null;

C. ArrayList<Integer> input=null;
List<Number> output=null;

E. List<Number> input=null;
List<Number> output=null;

F. List<Integer> input=null;
List<Integer> output=null;
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Manny,
Welcome to JavaRanch!

In an effort to help everyone get the most from our forums, we've compiled a
list of tips for asking questions here. You can find the list in our
FAQ section here.
In particular please see:
UseAMeaningfulSubjectLine

"Please explain this" tells us nothing about your question.
Many people won't even bother clicking on a thread with such a non-descriptive subject line.

Also, please see: QuoteYourSources

You've listed page and question numbers which makes us assume that this question came from a book but you've never listed which one.

Again, welcome to JavaRanch and good luck with your question.
-Ben
[ April 09, 2008: Message edited by: Ben Souther ]

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
manny singh
Greenhorn

Joined: Jan 18, 2008
Posts: 28
book is K&b scjp5 .

i have doubt in answers i listed..
i need to know why they are correct???
 
Don't get me started about those stupid light bulbs.
 
subject: please explain this!!
 
Similar Threads
Generics Question
doubt in generics........
SCJP 5 K&B question problem
doubt abt Generics mock question - from K&B
generic, self test example