Two Laptop Bag
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
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Ambiguity in Kathy Sierra Question" Watch "Ambiguity in Kathy Sierra Question" New topic

Ambiguity in Kathy Sierra Question

Sagar Kumbhar

Joined: Oct 27, 2007
Posts: 17
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

� 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 ]

Muhammad Saifuddin
Ranch Hand

Joined: Dec 06, 2005
Posts: 1323

This question is already been discussed on ranch.

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

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

Joined: May 31, 2008
Posts: 8
add should only be used for action listeners.
I agree. Here's the link:
subject: Ambiguity in Kathy Sierra Question
It's not a secret anymore!