This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java bean

 
hari vallabh shukla
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
why we write no argument constructor in java bean,which is provided by compiler by default
 
Winston Gutkowski
Bartender
Pie
Posts: 10108
56
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hari shukla wrote:why we write no argument constructor in java bean,which is provided by compiler by default

Where did you hear/read that you must?

Personally, I like to write explicit constructors for ALL my classes because I don't like relying on defaults; but it's just my preference.

BTW: Welcome to JavaRanch.

Winston
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic