How can the third one work and the others not, they are derived from the first.
I dont understand.
package com.codegym.task.task05.task0510;
/*
Initializing cats
*/
public class Cat {
//write your code here
public String name;
public int age;
public String address;
public int weight;
public String color;
public void initialize(String name){
this.name = "Fluffy";
this.age = 5;
this.weight = 5;
this.color = "Black";
this.address = address;
}
public void initialize(String name, int age, int weight){
this.name = "Fluffy";
this.age = 5;
this.weight = 5;
this.color = "Black";
this.address = address;
}
public void initialize(String name, int age){
this.name = "Fluffy";
this.age = 5;
this.weight = 5;
this.color = "Black";
this.address = address;
}
public void initialize(int weight, String color){
this.name = name;
this.age = 5;
this.weight = 5;
this.color = "Black";
this.address = address;
}
public void initialize(int weight, String color, String address){
this.name = name;
this.age = 5;
this.weight = 5;
this.color = "Black";
this.address = "Unknown";
}
public static void main(String[] args) {
}
}