Hello All,
Does the above code the
new Parent("Ravi"){} would call the Construtor(with
String) of the subclass extending Parent. Now my question is doesn't compiler insert super() as the first line of the constructor of the subclass (Just as it do asusual ). If it does, then does not it throw compiler error as no No-Arg constructor defined in Parent class.
actually it compiled fine and run too....I didn't understand why was there no compiler error?