class Garden{ private int area; public Garden (int a) { area = a; } public boolean equals (Garden g) { if (gl.area==g2.area) return true; else return false; } } public class MyClass { public static...


please solve it


class Garden{<br>private int area;<br>public Garden (int a) { area = a; }<br>public boolean equals (Garden g) {<br>if (gl.area==g2.area)<br>return true;<br>else<br>return false;<br>}<br>}<br>public class MyClass {<br>public static void main (String [] args){<br>new Garden (127);<br>= new Garden (127);<br>Garden g1 =<br>Garden g2<br>if (gl==g2) System.out.print (

Extracted text: class Garden{ private int area; public Garden (int a) { area = a; } public boolean equals (Garden g) { if (gl.area==g2.area) return true; else return false; } } public class MyClass { public static void main (String [] args){ new Garden (127); = new Garden (127); Garden g1 = Garden g2 if (gl==g2) System.out.print ("AAA"); else if (g1.equals (g2)) System.out.print ("BBB"); else System.out.print ("CCC"); }

Jun 08, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here