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. 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
Get step-by-step solutions from verified subject matter experts
