Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Is this consider a JavaBean?

 
K. Tsang
Bartender
Posts: 3397
13
Android Java
  • 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: 48652
56
  • 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: 3397
13
Android Java
  • 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: 3397
13
Android Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks Balu
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic