Не понимаю что не так.
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) {
int cat = 0;
int another = 0;
if (this.age > anotherCat.age)
cat++;
else
another++;
if (this.weight > anotherCat.weight)
cat++;
else
another++;
if (this.strength > anotherCat.strength)
cat++;
else
another++;
if (cat > another)
return true;
else
if (cat == another)
return false;
else
return false;
}
//напишите тут ваш код
public static void main(String[] args) {
}
}