The key to the last puzzles solution is ‘getting hold of the super class variable in the child class constructor.’ The simplest way to do so is using the super keyword.
The code snippet that achieves this is super.a = 10.
Congrats to
1. Sathi
2. Anonymous
for getting the answer right.
No comments:
Post a Comment
Solution for this question?