这道题应该怎么做
题目有点看不懂?
how to do this question?
I can't understand it.
package zh.codegym.task.task05.task0502;
/*
实现 fight 方法
*/
public class Cat {
public int age;
public int weight;
public int strength;
public Cat() {
this.age=age;
this.weight=weight;
this.strength=strength;
}
Cat cat1=new Cat();
Cat cat2=new Cat();
public boolean fight(Cat anotherCat) {
if(cat1.age<cat2.age||cat1.weight>cat2.weight||cat1.strength>cat2.strength)
return true;
else
return false;
}
public static void main(String[] args) {
cat1.fight(cat2);
}
}