public class Rectangle { int top,left,width,height; "Для чего вот здесь public, если и без него программа работает также" public Rectangle(int top,int left, int width,int height){ this.top = top; this.left = left; this.width = width; this.height = height; public class Rectangle int top,left,width,height; Rectangle(int top,int left, int width,int height){ this.top = top; this.left = left; this.width = width; this.height = height;