package com.java1.day12;
public class Rectangle {
private int x, y;
private int width, height;
Rectangle() {
this(0, 0, 1, 1);
}
Rectangle(int width, int height) {
this(0, 0, width, height);
}
Rectangle(int x, int y, int width, int height) {
this.x = x;
this.y = y;
this.width = width;
this.height = height;
}
public static void main(String[] args) {
new Rectangle(1, 2);
new Rectangle(100, 200);
new Rectangle(1, 1, 100, 200);
}
}