| Author |
Call to function inside construction?
|
raja kanak
Ranch Hand
Joined: Oct 18, 2006
Posts: 135
|
|
I got this question from www.jchq.net It compiles and run. I read that inside constructor, we can call only this and super then how come findOut(y) call works? If my understanding is wrong, please correct. Thanks for any help. rajakvk
|
live
|
 |
S Vilish
Ranch Hand
Joined: Feb 06, 2007
Posts: 39
|
|
I read that inside constructor, we can call only this and super
We can call any other method of the class inside the constructor. Vilish
|
 |
Burkhard Hassel
Ranch Hand
Joined: Aug 25, 2006
Posts: 1274
|
|
Hi raja, it is true that in the first line of the constructor, we can only this or super. Remember however, that if you don't put a call to this or super, the compiler provides an invisible call to super: Yours, Bu. [ February 17, 2007: Message edited by: Burkhard Hassel ]
|
all events occur in real time
|
 |
raja kanak
Ranch Hand
Joined: Oct 18, 2006
Posts: 135
|
|
|
thanks a lot for your efforts.
|
 |
 |
|
|
subject: Call to function inside construction?
|
|
|