Не валидит не могу понять почему.
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 = 4;
this.weight = 10;
this.color = "Рыжий";
}
public void initialize(String name, int age){
this.name = name;
this.age = age;
this.weight = 10;
this.color = "Рыжий";
}
public void initialize(String name, int age, int weight){
this.name = name;
this.age = age;
this.weight = weight;
this.color = "Рыжий";
}
public void initialize(int weight, String color){
this.name = "Бездомный";
this.age = 4;
this.weight = weight;
this.color = color;
}
public void initialize(int weight, String color, String address){
this.name = "Бездомный";
this.age = 4;
this.weight = weight;
this.color = color;
this.address = address;
}
public static void main(String[] args) {
}
}