java bean
1 posts in topic
Flat View  Flat View

Posted By:   ajit_roy
Posted On:   Thursday, March 30, 2006 06:10 AM

Hi all,

I want to know why a class having setter and getter method for its variables is called a bean?How it is different from any other java class.
I mean to say if a class has setter and getter method for its variables then is it
handled differently by a framework?What is the role of introspection here?Please express your views?

with regards,

Re: java bean

Posted By:   Christopher_Koenigsberg  
Posted On:   Sunday, April 9, 2006 10:11 AM

It's just how they defined things, and it makes a lot of stuff easier/possible.

By the way it's not exactly the "variables" that need getters and setters -- it's "properties". (assuming by "variables" you mean "member fields")

Some "properties" can be implemented with a public getter and setter but not even need a member field internally.... or with a member field that is named completely differently.
About | Sitemap | Contact