Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

what is the invisible statement in the constructor

 
Bhargavan Marepalli
Greenhorn
Posts: 15
Chrome Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is the invisible statement in the constructor???
 
Rameshwar Soni
Ranch Hand
Posts: 247
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think a call to its base class constructor.....i.e. equivalent of using
 
Rob Spoor
Sheriff
Pie
Posts: 20667
65
Chrome Eclipse IDE Java Windows
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is no "invisible statement". There is indeed the implicit call to super() if the constructor doesn't start with a call to super(...) or this(...), but I've never heard that being called an "invisible statement".
 
Nam Ha
Ranch Hand
Posts: 50
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you call super() explicitly, it must be the first line in the constructor, otherwise the compiler will complain.
 
Bhargavan Marepalli
Greenhorn
Posts: 15
Chrome Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you all...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic