Не принимает, чертяка. Не могу понять что здесь не так.
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) {
boolean a = this.age > anotherCat.age;
boolean w = this.weight > anotherCat.weight;
boolean s = this.strength >anotherCat.strength;
boolean[] param = {a, w, s};
int count = 0;
for(int i=0; i<param.length; i++){
if(param[i]){
count++;
}
else{
count--;
}
}
return (count>0);
}
public static void main(String[] args) {
}
}