File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "JavaBean method names" Watch "JavaBean method names" New topic

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: 802

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
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: JavaBean method names
It's not a secret anymore!