Валидация четвертый пункт не проходит, почему ?
package com.javarush.task.task05.task0502;
public class Cat {
public int age;
public int weight;
public int strength;
public Cat() {
}
public boolean fight(Cat anotherCat){
int age =0;
int weight =0;
int strength =0;
int a = anotherCat.age - this.age;
int w = anotherCat.weight - this.weight;
int s = anotherCat.strength - this.strength;
if (a<0){age++;} else {age--;}
if (w<0){weight++;} else {weight--;}
if (s<0){strength++;} else {strength--;}
int prime = age + weight + strength;
if (prime > 0) return 2>1;
else return 2<1;
}
public static void main(String[] args) {
Cat cat1 = new Cat();
cat1.age = 15;
cat1.weight = 25;
cat1.strength = 5;
Cat anotherCat = new Cat();
anotherCat.age = 10;
anotherCat.weight = 15;
anotherCat.strength = 55;
cat1.fight(anotherCat);
}
}