Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

1.4 objective confusinhg ?

 
ankur rathi
Ranch Hand
Posts: 3830
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is a line in 1.4 objective : use method name that adhere to the JavaBeans naming standards .

what it means ?

thanks .
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the JavaBeans naming standard dictates that method names are in CamelCase starting with a lowercase letter.
It also dictates that getters and setters should be called SomeThing getXXX() and void setXXX(SomeThing x) with boolean isXXX() (instead of getXXX()) if the field is a boolean field.

Other method names should in principle be based on nouns, so doSomething() instead of something()
 
ankur rathi
Ranch Hand
Posts: 3830
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jeroen ,

thanks a lot .
 
Marcus Green
arch rival
Rancher
Posts: 2813
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The objectives for the JDK 1.4 Sun certified Java programmers exam does not mention JavaBeans or the associated naming convention.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic