Вывод компилятора
com/javarush/task/task05/task0520/Rectangle.java:26: error: recursive constructor invocation
public Rectangle(int top, int left, int width)
package com.javarush.task.task05.task0520;
/*
Создать класс прямоугольник (Rectangle)
*/
public class Rectangle {
int top, left, width, 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 top, int left)
{
this(top, left);
this.width = 0;
this.height = 0;
}
public Rectangle(int top, int left, int width)
{
this(top, left, width);
this.height = width;
}
public Rectangle(Rectangle rectangle)
{
this.top = rectangle.top;
}
public static void main(String[] args) {
}
}