This week's book giveaway is in the Web Services forum.
We're giving away four copies of Microservices in Action and have Morgan Bruce & Paulo A. Pereira on-line!
See this thread for details.
Win a copy of Microservices in Action this week in the Web Services forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

OCA: Study Guide: Exam 1Z1-808 Chapter 4 #9 Errata  RSS feed

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Book
Certified Associate Java® SE 8 Programmer I Study Guide Exam 1Z0-808
By Jeanne Boyarsky and Scott Selikoff

Possible error in Chapter 4, Review Question 9

9. Which are methods using JavaBeans naming conventions for accessors and mutators?
(Choose all that apply)
A. public boolean getCanSwim() { return canSwim;}
B. public boolean canSwim() { return numberWings;}
C. public int getNumWings() { return numberWings;}
D. public int numWings() { return numberWings;}
E. public void setCanSwim(boolean b) { canSwim = b;}

As option C is supposed to be right, then shouldn't C option be
C. public int getNumWings() { return numWings;}
 
Ranch Hand
Posts: 232
5
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch!

Have you seen https://coderanch.com/t/649152/certification/JavaBeans-Chapter-Java-OCA-Programmer?
 
Marshal
Posts: 61805
193
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you checked the errata on this page? I didn't find it, but I might not have looked in the right place. The bit about numberWings does look dubious, so you are probably right.

And welcome to the Ranch
 
Elar Haljas
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, did not notice this forum post explaining the JavaBean spec. Thanks Ritchie.

I would say that page 206 Table 4.5 last sentence needs more specification then. Because there is nowhere explained JavaBean property and instance variable names need not match.

The method name must have a prefix of set/get/is, followed by the first letter of the property in uppercase, followed by the rest of the property name.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!