• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

please explain this!!

 
manny singh
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
??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
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
manny singh
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
book is K&b scjp5 .

i have doubt in answers i listed..
i need to know why they are correct???
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic