Не компилирует код. Ему не нравятся методы initialize в строке 20, 27, 34. В 13 строке всё в порядке.
package com.javarush.task.task05.task0513;
public class Rectangle {
int top;
int left;
int width;
int height;
public void initialize(int top){
this.top = top;
this.left = 0;
this.width = 0;
this.height = 0;
}
public void initialize(int left){
this.top = 0;
this.left = left;
this.width = 0;
this.height = 0;
}
public void initialize(int width){
this.top = 0;
this.left = 0;
this.width = width;
this.height = 0;
}
public void initialize(int height){
this.top = 0;
this.left = 0;
this.width = 0;
this.height = height;
}
public static void main(String[] args) {
}
}
Ошибка: com/javarush/task/task05/task0513/Rectangle.java:16: error: method initialize(int) is already defined in class com.javarush.task.task05.task0513.Rectangle
public void initialize(int left){
^