This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes JavaBean method names 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 "JavaBean method names" Watch "JavaBean method names" New topic
Author

JavaBean method names

R. Grimes
Ranch Hand

Joined: Aug 23, 2009
Posts: 42
On page 68, under the "Two Minute Drill" section, Objective 1.3, it states:

"JavaBeans must be named using camelCase, and depending on the methods proposed, must start with set, get, is, add, or remove."

Then, on the same chapter's Self Test Answers, page 79, question 2 asks:

"Which method names follow the JavaBeans standard?

A. addSize
B. getCust
C. deleteRep
D. isColorado
E. putDimensions"

You state that "A is incorrect because 'add' can be used only with Listener methods."

Seems misleading.

Ron Grimes
Ninad Kulkarni
Ranch Hand

Joined: Aug 31, 2007
Posts: 784

You may get help from here. See this discussion


SCJP 5.0 - JavaRanch FAQ - Java Beginners FAQ - SCJP FAQ - SCJP Mock Tests - Tutorial - JavaSE7 - JavaEE6 -Generics FAQ - JLS - JVM Spec - Java FAQs - Smart Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JavaBean method names
 
Similar Threads
Java Beans Question
Clarification
K&B Chapter 1 Question 5
contradictory statements
Ambiguity in Kathy Sierra Question