Solved

Consider the Classes Shown Below: Public Class Parent

Question 8

Multiple Choice

Consider the classes shown below: public class Parent
{
Public void doSomething() // method 1
{ /* Implementation not shown */ }
}
Public class Child extends Parent
{
Public void doSomething(int n) // method 2
{ /* Implementation not shown */ }
Public void doSomething() // method 3
{ /* Implementation not shown */ }
}
If the variable kid is defined below, which version of the doSomething method can be called on the variable kid?
Child kid = new Child() ;


A) Methods 1 and 2 only
B) Method 2 only
C) Methods 2 and 3 only
D) Methods 1, 2, and 3

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions