Question: 1. public class Circle { 2. private int radius; 3. private int x; 4. private int y; 5. 6. public Circle(int r) { 7. 8.

1. public class Circle { 2. private int radius; 3. private int x; 4. private int y; 5. 6. public Circle(int r) { 7. 8. this.radius = r; 9. 10. } 11. public double getArea() 12. { 13. return Math.PI * radius *radius; 14. } 15. 16. 17. public String toString(int n) { 18. return x+ " " + y + " " + radius; 19. } 20. 21. // The rest of the code for the Circle class 22. // ........ 23. } Assume that a Circle object c1 is already created with a radius of 24. What is the result of of the following statement: System.out.println(c1); O A. This is a syntax error OB. 0 0 24 OC. This is a run time error OD. The address of the Circle object O E. Circle@
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
