wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes Why Does JavaBean Require A No Argument Constructor? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Why Does JavaBean Require A No Argument Constructor? " Watch "Why Does JavaBean Require A No Argument Constructor? " New topic
Author

Why Does JavaBean Require A No Argument Constructor?

JiaPei Jen
Ranch Hand

Joined: Nov 19, 2000
Posts: 1309
Why does a JavaBean require a no argument constructor?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60780
    
  65

Not much to do with JSP, per se.
Moving to Java in General (beginner).
bear


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60780
    
  65

So that, given just the class name of the bean. an instance can be constructed. If the constructor required parameters, the instantiator would have no idea what values to use.
bear
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Why Does JavaBean Require A No Argument Constructor?
 
Similar Threads
how pojo is different from Normal Java Beans ?
HashMap bean with generic type parameters
Struts starting problem
How the objects are constructed at the time of de-serialization?
class file is not loading while running JSP file