Meaningless Drivel is fun!*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Study guide 5 Self Test error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Study guide 5 Self Test error" Watch "Study guide 5 Self Test error" New topic
Author

Study guide 5 Self Test error

elPete Martin
Greenhorn

Joined: Apr 27, 2006
Posts: 5
In the chapter 7, the question 16:

Given a method declared as:
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 the
code to compile? (Choose all that apply.)

And they say "B" is a good answere:

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

I try it with a real compiler and it doesnt work.
Is it a mistake?

Tanx
Deepak Bala
Bartender

Joined: Feb 24, 2006
Posts: 6657
    
    5

Look here:

http://www.coderanch.com/t/253976/java-programmer-SCJP/certification/book-Generic-Collections


SCJP 6 articles - SCJP 5/6 mock exams - More SCJP Mocks
elPete Martin
Greenhorn

Joined: Apr 27, 2006
Posts: 5
where cna I fin de errata for this book?

tanx again
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Study guide 5 Self Test error
 
Similar Threads
doubt abt Generics mock question - from K&B
SCJP 5 K&B question problem
Generics Question
generic, self test example
please explain this!!