Добрый вечер
Подскажите, пожалуйста, что не так?
package com.javarush.task.task05.task0520;
/*
Создать класс прямоугольник (Rectangle)
*/
public class Rectangle {
private int top;
private int left;
private int width;
private int height;
class Rect{
private int top;
private int left;
private int width;
private int height;
public void initialize (int top, int left, int width, int height){
this.top = top;
this.left = left;
this.width = width;
this.height = height;
}
}
public void initialize (int top, int left, int width, int height){
this.top = top;
this.left = left;
this.width = width;
this.height = height;
}
public void initialize (int top, int left){
this.top = top;
this.left = left;
}
public void initialize (int width){
this.height = width;
}
public void initialize (){
Rect rec = new Rect();
rec.initialize(10,5,20,1);
}
public static void main(String[] args) {
}
}