0

Assuming that both Class2 and class3 have default constructors, which is (are) valid in a client class?

I class1 c1 = new Class2(); II class2 c2 = new Class3(); III class3 c3 = new Class3(); a. I only b. II only c. III only d. I and II only e. I, II, and III

25th Apr 2019, 10:35 PM
IGOT7
IGOT7 - avatar
1 ответ
+ 4
Assuming you correctly capitalize your class names and Class3 inherits from Class2 which inherits from Class1, all three are valid. If not, only III is valid with correct capitalization.
22nd May 2019, 4:52 AM
John Wells
John Wells - avatar