Question: Q3. Correct the following code: b) a) public abstract myClass ( int result - 0 public void add(int x, int y) ( result x
Q3. Correct the following code: b) a) public abstract myClass ( int result - 0 public void add(int x, int y) ( result x + y; } public abstract void print(); ( System.out.print(result); public class myClass ( private int x; public float getX() ( return x; } public void setX(int x) { this.x = x; (2 marks) (2 marks) (6 marks) Page 4 of 8
Step by Step Solution
3.38 Rating (154 Votes )
There are 3 Steps involved in it
It looks like the provided code has several syntax errors and issues Ill provide corrected versio... View full answer
Get step-by-step solutions from verified subject matter experts
