| Author |
what is the invisible statement in the constructor
|
Bhargavan Marepalli
Greenhorn
Joined: Jun 25, 2011
Posts: 15
|
|
|
what is the invisible statement in the constructor???
|
 |
Rameshwar Soni
Ranch Hand
Joined: Feb 03, 2011
Posts: 246
|
|
|
I think a call to its base class constructor.....i.e. equivalent of using
|
 |
Rob Spoor
Sheriff
Joined: Oct 27, 2005
Posts: 19216
|
|
|
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".
|
SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
|
 |
Nam Ha
Ranch Hand
Joined: Aug 05, 2011
Posts: 50
|
|
|
If you call super() explicitly, it must be the first line in the constructor, otherwise the compiler will complain.
|
Java Object Creation
|
 |
Bhargavan Marepalli
Greenhorn
Joined: Jun 25, 2011
Posts: 15
|
|
|
thank you all...
|
 |
 |
|
|
subject: what is the invisible statement in the constructor
|
|
|