This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Question 58 Quiz B in master exam of K&B Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Reply Bookmark "Question 58 Quiz B in master exam of K&B" Watch "Question 58 Quiz B in master exam of K&B" New topic
Author

Question 58 Quiz B in master exam of K&B

Sanjay Singhaniya
Greenhorn

Joined: Feb 21, 2009
Posts: 25
It has a line mentioning
Arrays.asList(16,8,42,15,4,23)

I am getting compiler error on this stmt. But the answer to the question is not "compilation fails".
I have attached the screenshot.
Please explain.


[Thumbnail for 58.jpg]

Stephen Davies
Ranch Hand

Joined: Jul 23, 2008
Posts: 352
You are correct, the code compiles and prnts 42. I suppose it is an error.



be a well encapsulated person, don't expose your privates, unless you public void getWife()!
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Question 58 Quiz B in master exam of K&B
 
Similar Threads
can I add Vectors together?
equals hashCode doubt from mock test
IBM WebSphere
IBM 287 ICE TEST
Why we should prefer synchronization?