Consider the following class definitions.public class BClass
{
Private int x;
Private double y; public void print() { }
}public class DClass extends BClass
{
Private int a;
Private int b; public void print() { }
}Suppose that you have the following statement.DClass dObject = new DClass() ;How many instance variables does dObject have?
A) zero
B) two
C) three
D) four
Correct Answer:
Verified
Q21: An interface is a class that contains
Q22: Interfaces are defined using the reserved word
Q24: If class Dog has a subclass Retriever,
Q28: Composition is a "has-a" relationship.
Q29: Any new class you create from an
Q31: Based on the diagram in the accompanying
Q32: Suppose a class Car and its subclass
Q34: Which of the following statements about the
Q35: Inheritance is an example of what type
Q40: An abstract method is a method that
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents