Question: Question 4 1 pts Consider: class A { public void doA ( ) { } } class B extends A { public void doB (

Question 41 pts
Consider:
class A
{
public void doA()
{
}
}
class B extends A
{
public void doB()
{
}
}
class C extends B
{
public void doC()
{
}
}
Which of the following is allowed?
Group of answer choices
B x = new C();
B x = new B();
C x = new B();
A x = new B();
C x = new A();
A x = new A();
C x = new C();
B x = new A();

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!