Question: a. What is wrong in the following code? b. Correct the code. 1 public class Test { 2 public static void main(String[] args) {

 a. What is wrong in the following code? b. Correct the code. 

a. What is wrong in the following code? b. Correct the code. 1 public class Test { 2 public static void main(String[] args) { 3 Object fruit new Eruit(); 4 Object apple (Apple)fruit; 5. 7 8 class Apple extends Fruit { 10 11 class Fruit { 122

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 Programming Questions!