Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Beginning Java and the fly likes Is this consider a JavaBean? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "Is this consider a JavaBean?" Watch "Is this consider a JavaBean?" New topic
Author

Is this consider a JavaBean?

K. Tsang
Ranch Hand

Joined: Sep 13, 2007
Posts: 1222

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)?


K. Tsang JavaRanch SCJP5 SCJD/OCM-JD
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 32708
    
    4
I am not sure, but I think you need a setVar2(int) method.
K. Tsang
Ranch Hand

Joined: Sep 13, 2007
Posts: 1222

thanks Campbell, so i assume it's not a javabean.
Balu Sadhasivam
Ranch Hand

Joined: Jan 01, 2009
Posts: 874




One of the rule of Java Beans is the setter argument type must be same as the getter return type.
K. Tsang
Ranch Hand

Joined: Sep 13, 2007
Posts: 1222

thanks Balu
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Is this consider a JavaBean?
 
Similar Threads
Help with objectifying code (constructor method) for simple compound interest quesion
methods with parameters
need some help
Elegant Java
Inheritance problem