• Post Reply Bookmark Topic Watch Topic
  • New Topic

Is this consider a JavaBean?  RSS feed

 
K. Tsang
Bartender
Posts: 3639
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)?
 
Campbell Ritchie
Sheriff
Posts: 54070
130
  • 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: 3639
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.
 
Balu Sadhasivam
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: 3639
16
Firefox Browser Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks Balu
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!