The above code compiles and give output 10. My question is why its not giving compiler error for not finding default constructor in the code. According to me Line 1 first give call to default constructor. Please do correct me.
Originally posted by sandhi mridul: ...According to me Line 1 first give call to default constructor...
If the first line of a constructor is not an explicit call to this or super (using the appropriate arguments), then there is an implicit call to super with no arguments. But there is no implicit call to this.
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer sscce.org
Getting married means "We're in love, so let's tell the police!" - and invite this tiny ad to the wedding:
a bit of art, as a gift, the permaculture playing cards