При проверке выдаёт следующее:
method с именем "initialize(int,java.lang.String)" уже объявлен(а) в classе com.javarush.task.task05.task0510.Cat. Имя идентификатора должно быть уникально в рамках блока.
файл com/javarush/task/task05/task0510/Cat.java, строка 37, позиция 739
Так и не нашёл своей ошибки. Подскажите, где я не прав?
package com.javarush.task.task05.task0510;
/*
Кошкоинициация
*/
public class Cat {
//напишите тут ваш код
String name;
int age;
int weight;
String address;
String color;
public void initialize(String name) {
this.name = name;
this.age = 12;
this.weight = 49;
this.color = "Red";
}
public void initialize(String name, int weight, int age) {
this.name = name;
this.weight = weight;
this.age = age;
this.color = "White";
}
public void initialize(int age, String name) {
this.age = age;
this.name = name;
this.weight = 11;
this.color = "Blue";
this.address = null;
}
public void initialize(int weight, String color) {
this.weight = weight;
this.color = color;
this.age = 1;
this.name = null;
this.address = null;
}
public void initialize(int weight, String color, String address) {
this.weight = weight;
this.color = color;
this.address = address;
this.age = 3;
this.name = null;
}
public static void main(String[] args) {
}
}