Question: Will the following code compile?abstract class A private int x public A ( x = 7 public A ( int y ) { x =
Will the following code compile?abstract class A private int x public A x public Aint y x y public abstract int dostuff public abstract int dostuff class B extends A public B super ; public B int y supery ;@Override public int dostuff return ; @Override public int dostuff return ; class Main public static void main String args BmyB newB ; No class A cannot have a constructor since it's abstract No class B can't have a constructor since it's inheriting from an abstract class A No you can't use superbase to call a constructor in an abstract class Yes
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
