С кодом все в порядке, на первый взгляд. Помогите, кто имеет время, знайти ошибку!
Буду благодарен. 😎
символы //- означают в методе есть ошибка!
package com.javarush.task.task05.task0510;
/*
Кошкоинициация
*/
public class Cat {
private String name = null;
private int age = 1;
private int weight = 3;
private String color = "grey";
private String address = null;
public void initialize(String name){
this.name = name;
this.age=this.age;
this.weight=this.weight;
this.color=this.color;
}
public void initialize(String name, int age, int weight){
this.name = name;
this.age = age;
this.weight = weight; // -
this.color= this.color;
}
public void initialize(String name, int age){
this.name = name;
this.age = age;
this.weight = this.weight;
this.color=this.color;
}
public void initialize(int weight, String color){
this.age = this.age;
this.weight = weight;
this.color = color;
}
public void initialize(int age, int weight, String address){
this.age= age;
this.weight= weight;
this.color = this.color; //-
this.address= address;
}
public static void main(String[] args) {
}
}