[2.5 marks Q1. Find errors in this code and correct them: 01: public class Animal implements feet 02: private int ab: 03
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
[2.5 marks Q1. Find errors in this code and correct them: 01: public class Animal implements feet 02: private int ab: 03
[2.5 marks Q1. Find errors in this code and correct them: 01: public class Animal implements feet 02: private int ab: 03: 04: public Animal(int a, int b) { 05: this.a -a; 06: this.b-b; 07:} 08: abstract void print(); 09: 10: interface feet 11: void 120: 12:} 13: public class Cat extends Animal 14: private int z; 15: public Cat(int x, int y){ 16: this.x -x: 17: this.y - y 18:) 19: public void move! 20: System.out.println("A Cat is walking"); 21:) 22: public class Test 23: public static void main(String[] args) { 24: 25: Animal a=new Cat(4,8); 26: a.move(); 27: 28:) Line no. Error detected Correction
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!