Π§Π΅Π³ΠΎ ΠΏΠ°ΡΠ½ΠΈ Π΅ΡΠ΅ Π½Π΅ Ρ
Π²Π°ΡΠ°Π΅Ρ?
package com.javarush.task.task05.task0510;
/*
ΠΠΎΡΠΊΠΎΠΈΠ½ΠΈΡΠΈΠ°ΡΠΈΡ
*/
public class Cat {
String name=null ;
String address=null;
String color ="cras" ;
int age = 12 ;
int weight= 40;
public void initialize (String name ){
this.name = name;
this.color = color;
this.weight = weight;
this.age = age;
}
public void initialize (String name ,int weight, int age ){
this.name = name;
this.color = color;
this.weight = weight;
this.age = age;
}
public void initialize ( int age, String name){
this.name = name;
this.color = color;
this.weight = weight;
this.age = age;
}
public void initialize (String name , int age){
this.color = color;
this.weight = weight;
this.age = age;
this.name =name;
}
public void initialize (int weight, String color, String address ){
this.color = color;
this.weight = weight;
this.age = age;
this.address= address;
this.name = null;
}
public static void main(String[] args) {
}
}