Подскажите, что не так во втором методе. Порядок инициализации соблюден, как указано в задании???
package com.javarush.task.task05.task0510;
/*
Кошкоинициация
*/
public class Cat {
//напишите тут ваш код
private String name;
private int weight;
private int age;
private String address;
private String color;
public void initialize( String name ){
this.name = name;
this.load("BLACK", 3, 5 );
}
public void initialize( String name, int weight, int age ){
this.name = name;
this.weight = weight;
this.age = age;
this.color = "Black";
}
public void initialize( String name, int age ){
this.name = name;
this.load("BLACK", age, 4 );
}
public void initialize( int weight, String color ){
this.load( color, 4, weight );
}
public void initialize( int weight, String color, String address ){
this.address = address;
this.load( color, 4, weight );
}
public void load( String color, int age, int weight ){
this.weight = weight;
this.age = age;
this.color = color;
}
public static void main(String[] args) {
}
}