Чет я вообще ничего не понял, если есть параметры, то им не надо присваивать значения в инициализации же? А в других случаях надо ставить дефолтные
package com.javarush.task.task05.task0510;
/*
Кошкоинициация
*/
public class Cat {
String name, address, color;
int age, weight;
public void initialize (String name) {
this.name = name;
this.age = 12;
this.weight = 23;
this.color = "red";
}
public void initialize (String name, int weight, int age) {
this.name = name;
this.age = age;
this.weight = weight;
this.color = "orange";
}
public void initialize (String name, int age) {
this.name = name;
this.age = age;
this.weight = 14;
this.color = "yelow";
}
public void initializew (String color, int weight) {
this.age = 3;
this.weight = weight;
this.color = color;
}
public void initialize (String color, int weight, String address) {
this.address = address;
this.age = 33;
this.weight = weight;
this.color = color;
}
public static void main(String[] args) {
}
}