aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Ambiguity in Kathy Sierra Question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Ambiguity in Kathy Sierra Question" Watch "Ambiguity in Kathy Sierra Question" New topic
Author

Ambiguity in Kathy Sierra Question

Sagar Kumbhar
Greenhorn

Joined: Oct 27, 2007
Posts: 17
Hi,
there is incorrect answer for question no. 5 of Chapter 1

the question is :

Which method names follow the JavaBeans standard? (Choose all that apply.)
A. addSize
B. getCust
C. deleteRep
D. isColorado
E. putDimensions

Answer:
� 3 B and D use the valid prefixes 'get' and 'is'.
�˚ A, C, and E are incorrect because 'add', 'delete' and 'put' are not standard JavaBeans name prefixes.


but the Two minute drill of first chapter says that:

JavaBeans methods must be named using camelCase, and depending on the
method's purpose, must start with set, get, is, add, or remove.

so the option A addSize must be correct.

am I correct??
[ June 14, 2008: Message edited by: sagar kumbhar ]

SCJP 5
Muhammad Saifuddin
Ranch Hand

Joined: Dec 06, 2005
Posts: 1321

This question is already been discussed on ranch.


Saifuddin..
[Blog][Linkedin] How To Ask Questions On JavaRanch My OpenSource
Sagar Kumbhar
Greenhorn

Joined: Oct 27, 2007
Posts: 17
Thanks Muhammad,
next time i will search first !!
Mujahid Al-okaidi
Greenhorn

Joined: May 31, 2008
Posts: 8
add should only be used for action listeners.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Ambiguity in Kathy Sierra Question
 
Similar Threads
Java Beans Question
JavaBean standard question from Sierra's book
K&B Chapter 1 Question 5
Clarification
JavaBeans naming standard Question