jQuery in Action, 3rd edition
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes autoboxing available in SCWCD5? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "autoboxing available in SCWCD5?" Watch "autoboxing available in SCWCD5?" New topic

autoboxing available in SCWCD5?

Parth Twari
Ranch Hand

Joined: Jan 20, 2010
Posts: 163
the question is what shall i assume in exam autoboxing is there or not?

this entry in errata says its not there-

HFSJ 2nd edition
Page 847
Question 39 - Answer D

The question reads:
Given req is a reference to a valid HttpServletRequest, and:
13. String[] s = req.getCookies();
14. Cookie[] c = req.getCookies();
15. req.setAttribute("myAttr1", "42");
16. req.setAttribute("myAttr2", 42);
17. String[] s2 = req.getAttributeNames();
18. String[] s3 = req.getParameterValues("attr");
Which lines of code will not compile? (Choose all that apply.)
A. line 13
B. line 14
C. line 15
D. line 16
E. line 17
F. line 18
The soultion says that Answer D is not correct. "-Option D: setAttribute() takes a String and an Object, and as of Java 5, 42 can be boxed to an Object."
While this may be true for Java 5, this exam does not test on Java 5 as noted on page xxviii of the book: "About the SCWCD (for Java EE 1.5) exam The updated SCWCD exam is called "Sun Certified Web Component Developer for the Java Platform, Enterprise Edition 5" (CX-310-083), but don't get confused by the title.
The updated exam is still designed for Java EE v1.4 and for the servlet v2.4 and JSP v2.0 specifications." Which means autoboxing does not exist and Answer D IS correct. Line 16 will not compile.

Note from the Author or Editor:
Agreed. Drop option D and line 16 from the question here and on pg 811

errata of hf 2nd edition

So what shall I assume for the exam?

Parth Tiwari
| Pursuing Bachelor of Engineering | OSUM Club Leader | SCJP 6 | SCWCD 5 |...
Ankit Garg

Joined: Aug 03, 2008
Posts: 9463

Well the errata says to drop the option and the line completely. The authors are saying that you wont be tested on the new features of Java 5 like autoboxing. So you should not get any question like that. But I did face a question which used a new feature of Java 5 on the exam and I chose the answer keeping in mind the new Java 5 features. So for the exam you can say option D is not correct...

SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
I agree. Here's the link: http://aspose.com/file-tools
subject: autoboxing available in SCWCD5?
jQuery in Action, 3rd edition