• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Java bean & public no arg constructor

 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

It's my understanding that a java bean class must provide a public no arg constructor. What if it doesn't ?

I know I can find the answer by trying it out, but i'm in a hurry to write my exam(may be i'm stupid to be trying to attempt the exam without installing the tomcat and trying out some examples, but i'm desparate to get certified ASAP. So I thought of reading HFS book twice and attempting the final mock exam and if don't score well, then installing tomcat and all, but as I got 66%, i thought i'm almost ready for the exam. So i'm trying to get clarifications here.

I tried Anand Chawla's mock exam. In that, a bean was not provided with a public no arg constructor, so i thought it'd give an error, but that was not the case. The answer did not reflect the fact that there was no public no arg constructor.

I know I deserve some scoldings for being lazy to not try this out on my own

Thanks
Suma
[ April 17, 2005: Message edited by: suma sindu ]
 
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The compiler supplied default constructor will take care of it. As long as you don't have any other constructor whick takes an argument(s).
 
reply
    Bookmark Topic Watch Topic
  • New Topic