Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

java bean  RSS feed

 
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
Posts: 10573
65
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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!