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?
Parent kid = new Child() ;
A) Method 1 only
B) Methods 2 and 3 only
C) Methods 1 and 2 only
D) Methods 1, 2, and 3
Correct Answer:

Verified
Correct Answer:
Verified
Q13: Which reserved word must be used to
Q33: When declared as protected, data in an
Q35: Consider the classes shown below: public class
Q36: Consider the following code snippet: public abstract
Q37: A class that represents a more specific
Q39: Consider the classes shown below: public class
Q40: Consider the following code snippet: public class
Q42: Consider the following code snippet: Auto consumerAuto
Q51: All hamsters are rodents and all rodents
Q72: To test whether an object belongs to