Question: Which of the following is valid in Java, if a class XYZ is a directed superclass of ABC and XYZ is a directed subclass of

Which of the following is valid in Java, if a class XYZ is a directed superclass of ABC and XYZ is a "directed" subclass of EFG (suppose they all have no-argument constructors)?

Select one:

a. XYZ b = new ABC();

b. EFG c = new XYZ();

c. EFG a = new ABC();

d. All of the other answers

this.aM = this.aF(); Given the above valid statement, which of the following is correct?

Select one:

a. None of the other answers

b. This statement assigns a variable with a value of int data type .

c. This statement includes a method calling with return type void.

d. This statement must be in a method body of the class itself.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!