• Post Reply Bookmark Topic Watch Topic
  • New Topic

JSP Using Javabean  RSS feed

 
Nischal Tanna
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it compulsory to have the method name as getAge() if we r having a private property as Age.i.e, cant we have something like getag() for the property named Age??
 
Bosun Bello
Ranch Hand
Posts: 1512
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In order to comform to the JavaBean specs, yes. You will need a getAge() method if you have a property called age. If it's a writable property, you will also need setAge(argType arg)
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!