мне кажется все логично. но не проходит
package com.javarush.task.task05.task0502;
/*
Реализовать метод fight
*/
public class Cat {
public int age;
public int weight;
public int strength;
public Cat() {
}
public boolean fight(Cat anotherCat) {
Cat cat1= new Cat();
Cat cat2=new Cat();
//}
while (true) if ((cat1.age > cat2.age) | (cat1.weight > cat2.weight) | (cat1.strength > cat2.strength)) {
//cat1.fight(cat2);
return true;
}
//else if ((cat1.age < cat2.age) | (cat1.weight < cat2.weight) | (cat1.strength < cat2.strength)){
//cat2.fight(cat1);
//return true;
//}
else //if((cat1.age == cat2.age) |(cat1.weight==cat2.weight)|(cat1.strength==cat2.strength)){
return false;
}
public static void main(String[] args) {
}
}