В чем дело?
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 counter = 0;
if (anotherCat.age > this.age){
counter++;
}
if(anotherCat.weight > this.weight){
counter++;
}
if(anotherCat.strength > this.strength){
counter++;
}
if (counter > 1){
return true;
}
else{
return false;
}
}
public static void main(String[] args) {
}
}