Переменные объявил. Но всё равно ругается на всё.
/*
Создать класс прямоугольник (Rectangle)
*/
public class Rectangle {
public int top;
public int left;
public int width;
public int height;
public Rectangle(int left, int height) {
this.top = 0;
this.left = left;
this.width = 0;
this.height = height;
}
public Rectangle(int top, int left, int width, int height) {
this.top = top;
this.left = left;
this.width = width;
this.height = height;
}
public Rectangle(int left, int width, int height) {
this.top = width;
this.left = left;
this.width = width;
this.height = height;
}
public Rectangle(Rectangle o) {
this.top = o.top;
this.left = o.left;
this.width = o.width;
this.height = o.height;
}
public static void main(String[] args) {
}
}