Can anybody reply the solution code for this plss....or tell me what is the wrong in my code
package com.codegym.task.task05.task0502;
/*
Implement the fight method
*/
public class Cat {
public int age;
public int weight;
public int strength;
public Cat() {
}
public boolean fight(Cat anotherCat){
if(Cat.weight>anotherCat.weight && Cat.age>anotherCat.age && Cat.strength<anotherCat.strenght);
return true;
else
return false;
}
public static void main(String[] args) {
Cat cat1=new Cat();
Cat cat2=new Cat();
cat1.weight=50;
cat1.age=9;
cat1.strength=8;
cat2.weight=44;
cat2.age=7;
cat2.strength=10;
System.out.println(cat1.fight(cat2));
System.out.println(cat2.fight(cat1));
}
}