Solved

Consider the Following Class Definitions

Question 33

Multiple Choice

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:

verifed

Verified

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

Related Questions