File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

please explain this!!

manny singh

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:

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

Joined: Dec 11, 2004
Posts: 13410

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:

"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.
[ 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

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???
I agree. Here's the link:
subject: please explain this!!
It's not a secret anymore!