Nie mam pojęcia dlaczego nie działa :/
package pl.codegym.task.task05.task0502;
/*
Zaimplementuj metodę walka
*/
public class Kot {
public int wiek;
public int waga;
public int sila;
public Kot() {
}
public boolean walka(Kot innyKot) {
Kot kot1 = new Kot();
Kot kot2 = new Kot();
kot1.wiek = 6;
kot1.waga = 12;
kot1.sila = 7;
kot2.wiek = 7;
kot2.waga = 13;
kot2.sila = 3;
boolean b = true;
boolean c = false;
if (kot1.wiek + kot1.waga + kot1.sila < kot2.wiek + kot2.waga + kot1.sila){
return b;}
else if (kot1.wiek + kot1.waga + kot1.sila > kot2.wiek + kot2.waga + kot1.sila){return c;}
return c||b;}
public static void main(String[] args) {
}
}