Win a copy of Securing DevOps this week in the Security forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Is this consider a JavaBean?  RSS feed

 
Bartender
Posts: 3648
16
Firefox Browser Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all, I want to make sure my definition of JavaBean.



I want to point out is the method setVar2(String) valid if classify as JavaBean? Or "must" I use setVar2(int)?
 
Sheriff
Posts: 57897
178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not sure, but I think you need a setVar2(int) method.
 
K. Tsang
Bartender
Posts: 3648
16
Firefox Browser Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks Campbell, so i assume it's not a javabean.
 
Ranch Hand
Posts: 874
Android Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator



One of the rule of Java Beans is the setter argument type must be same as the getter return type.
 
K. Tsang
Bartender
Posts: 3648
16
Firefox Browser Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks Balu
 
Destiny's powerful hand has made the bed of my future. And this tiny ad:
Thread Boost - a very different sort of advertising
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!