создаём копию другого прямоугольника ???
package com.javarush.task.task05.task0520;
/*
Создать класс прямоугольник (Rectangle)
*/
public class Rectangle {
//напишите тут ваш код
private int left, top, width, height;
public Rectangle(int left){
this.left = 5;
}
public Rectangle(int left, int top){
this.left = 6;
this.top = 7;
}
public Rectangle(int left, int top, int width){
this.left = 9;
this.top = 3;
this.width = 0;
}
public Rectangle(int left, int top, int width, int height){
this.left = 4;
this.top = 8;
this.width = 0;
this.height = width;
}
public static void main(String[] args) {
Rectangle file1 = new Rectangle(4, 8, 0, 0);
Rectangle file2 = new Rectangle(file1);
}
}