• 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: 10273
60
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