JavaBeans zeo arg constructor

FOR a java class to be a java bean its told taht we have to follow two rules:1. it must be serializable2. it should provide zero arg constructor.point 1 is claer , but why shoud we provide a zero arg constructor as it will be implicitly available to the class
[287 byte] By [BenjaminJavaa] at [2007-11-26 16:22:03]
# 1

> point 1 is claer , but why shoud we provide a zero

> arg constructor as it will be implicitly available to

> the class

You don't have to provide a zero-argument constructor, but you do need to make sure one exists. For example, if there are other constructors then there is no implicit zero-argument constructor. The easiest way to make sure one exists is to write it yourself.

DrClapa at 2007-7-8 22:45:49 > top of Java-index,Java Essentials,Java Programming...
# 2
Thank you DrClap for your reply. I have on more clarification, is providing getters and setters not a mandatory requirement for a java bean
BenjaminJavaa at 2007-7-8 22:45:49 > top of Java-index,Java Essentials,Java Programming...
# 3
What does your "it is told" resource have to say about that?
DrClapa at 2007-7-8 22:45:49 > top of Java-index,Java Essentials,Java Programming...
# 4
nothin on that has been mentioned
BenjaminJavaa at 2007-7-8 22:45:49 > top of Java-index,Java Essentials,Java Programming...
# 5
Well, I don't want to speak for your unnamed source so I will leave them to speak for themselves.
DrClapa at 2007-7-8 22:45:49 > top of Java-index,Java Essentials,Java Programming...
# 6
<meetingUnnamedSource id="deep throat"><location>Underground Parking Garage</locatio><attire>Trenchcoat</attire></meetingUnnamedSource>
DrLaszloJamfa at 2007-7-8 22:45:49 > top of Java-index,Java Essentials,Java Programming...