Ikpefua Jacob-Obinyan wrote:I got a question that invoked run() method THREE times, I chose compiler error and guess what?? I got it wrong! ... The code compiles and runs perfectly.
Ikpefua Jacob-Obinyan wrote:@Mala...Thanks for your reply, I knew that before, I was just trying to let you know how a fell on an exam 'Trip-Trap', thinking that a run method could not be invoked twice, even if invoking it directly meant a normal invocation, my question refers to the keyword 'super' I am wondering if one could encounter an exam question directly testing your knowledge on a multiple call to super??...
Ikpefua Jacob-Obinyan wrote:I am wondering if one could encounter an exam question directly testing your knowledge on a multiple call to super??...
Matthew Brown wrote:Also possible - and trickier (because it's less obvious) - would be a constructor where a call to super() wasn't the first line, which is also not allowed.
Mala Gupta wrote:I am afraid I didn't get your point here. A constructor doesn't allow a call to base class constructor, if it isn't the first line. Then how is this possible?
Matthew Brown wrote:That's my point. I wouldn't put it past them to slip in a super() call somewhere other than the first line, to see if you notice.
It wasn't my idea to go to some crazy nightclub in the middle of nowhere. I just wanted to stay home and cuddle with this tiny ad:
Free, earth friendly heat - from the CodeRanch trailbosshttps://www.kickstarter.com/projects/paulwheaton/free-heat