Becoz bean uses interospection to deside members of the class so it
need no argument constructor.
> hi,
> i am new to java beans.
> why is it necessary to use the default counstructor for a bean which
> contains no parameters?
> i am new to java beans.
> why is it necessary to use the default counstructor for a bean which
> contains no parameters?
The no-args constructor allows tools or libraries to construct a bean of
a given class. There's not much point fiddling with the properties and
events of a bean if you can't construct it in the first place.
(Point of pedantry: "Default constructor" with this meaning is a C++
term. In Java a default constructor is just the synthetic constructor
provided by the compiler if no others are present.)
Tom Hawtin

Signature
Unemployed English Java programmer
http://jroller.com/page/tackline/
arvind - 05 Sep 2006 15:33 GMT
Thanks for the reply Thomas.
> > i am new to java beans.
> > why is it necessary to use the default counstructor for a bean which
[quoted text clipped - 12 lines]
> Unemployed English Java programmer
> http://jroller.com/page/tackline/