I think it is D but I could be wrong(probably am lol) I think this because of inheritance I figure since a,b don't change from A(well I think they don't) so why not call them from the superclass and then add the 3rd one.

A default "no-args" constructor is automatically provided by the compiler only if no other constructors are provided. In this case, AClass has a constructor that takes two ints, so it does not have a no-args constructor.

If the first line of a constructor is not an explicit call to this (an overloaded constructor for the same class) or an explicit call to super (a superclass constructor), then there is an implicit call to super with no-args. So options B and C both contain an implicit call to a no-args super, which does not exist. Option E contains an explicit call to this non-existant constructor.

Option A tries to call a super constructor with 3 int arguments. This constructor also does not exist.

But even if AClass had a no-args constructor, there is another important reason for the approach in option D.

BClass extends ("is-a") AClass. So in order to construct an instance of BClass, we first need a complete instance of AClass to use as a "foundation." Otherwise, a BClass constructor runs the risk of trying to access a member that's not properly initialized. This is why there is a call to super -- implicitly, if not explicitly -- as the first line of any constructor (other than the base class Object).

In this case, because variables x and y are declared in AClass, and AClass has a constructor to initialize these, this is where these variables should be initialized. This way, when the body of BClass's constructor executes, it has a properly initialized instance of AClass to work with.

"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummersscce.org