Question 6
Consider the code given below.
class Rectangle{ double length, width; public Rectangle(double l, double w) { length = l; width = w; } public Rectangle(Rectangle r){ length = r.length; width = r.width; } public double perimeter(){ return 2 * (length + width); }}public class ConTest { public static void main(String[] args) { Rectangle r1 = new Rectangle(6.0, 3.20); Rectangle r2 = new Rectangle(r1); Rectangle r3 = new Rectangle(r2); r1.width = 3.0; System.out.println(r1.perimeter()); System.out.println(r2.perimeter()); System.out.println(r3.perimeter()); }}What will the output be?