In regards to the K&B SCJP 1.5 Study Guide- In the Chapter 1 Self Test questions, the 5th question reads like so: 5) Which method names follow the Java Beans Std? A. addSize B. getCust C. deleteRep D. isColorado E. putDimensions
The book says the correct answers are B,D. However, it seems like A should also be a valid answer as well. For page 9 of the book, under JavaBeans Stds specifically says that listener methods must be prefixed with the word "add" followed by the listener type. This is a seemingly petty issue, for sure, but I want to make sure I nail these kind of basic questions should they appear on the test.
The key details are to be found in the JavaBeans API spec, sections 6 & 8 - the discussion Bert is referring to above is one I started. What it comes down to is that the 'Listener Type' also has a naming convention - it has to end with the word 'Listener'.
Just out of curiosity, has anyone faced such question on the exam?? I believe Java beans naming convention should really not be touched upon in a SCJP exam and i guess something to the same effect has been mentioned in Kathy and Bert's book?
posted 12 years ago
As of the 1.5 exam you might get one or two questions concerning the JavaBean naming standards, but they are probably some of the easier questions in the whole exam.
Spot false dilemmas now, ask me how!
(If you're not on the edge, you're taking up too much room.)