Question: Which constructors can be inserted at (1) in MySub without causing a compiletime error? Select the one correct answer. (a) MySub() {} (b) MySub(int count)

Which constructors can be inserted at (1) in MySub without causing a compiletime error?

class MySuper { int number; MySuper (int i) { number = i;

Select the one correct answer.

(a) MySub() {}

(b) MySub(int count) { this.count = count; }

(c) MySub(int count) { super(); this.count = count; }

(d) MySub(int count) { this.count = count; super(count); }

(e) MySub(int count) { this(count, count); }

(f) MySub(int count) { super(count); this(count, 0); }

class MySuper { int number; MySuper (int i) { number = i; } } class MySub extends MySuper { int count; MySub (int count, int num) { super (num); this.count = count; } // (1) INSERT CONSTRUCTOR HERE }

Step by Step Solution

3.53 Rating (156 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

e The class MySuper does not have a noargument constructor This means tha... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Java Programming 8th Questions!