Ни один метод initialize не работает? Почему и как исправить?)
package com.javarush.task.task05.task0517;
/*
Конструируем котиков
*/
public class Cat {
//напишите тут ваш код
//напишите тут ваш код
String name = null;
String address ;
String color;
int age =3;
int weight = 5;
Cat cat = new Cat() ;
public void initialize(String name)
{
this.name =name;
this.age =7;
this.weight =16;
this.color ="зеленый";
}
public void initialize(String name, int weight, int age)
{
this.name =name;
this.age =age;
this.weight = weight;
this.color ="жёлтый";
}
public void initialize(String name, int age)
{
this.name =name;
this.age =age;
this.weight =12;
this.color ="рыжий";
}
public void initialize(int weight, String color)
{
this.age =6;
this.weight = weight;
this.color =color;
}
public void initialize(int weight, String color, String address)
{
this.age =3;
this.weight =weight;
this.address =address;
this.color = color;
}
public static void main(String[] args) {
}
}