operator || cant be applied to OlimpicFrog, boolean
I cant compile my code cause of error:
"operator || cant be applied to OlimpicFrog, boolean"
Error is in method:
* Moves to the home position and then moves right by the number of times indicated by the class constant RUN_UP,
* Performs a jump; Next Increments the receiverís medalCount by one and then checks the value of the class variable currentLeader.
* (To become the current leader, an OlympicFrog must have more medals than the current title holder.
* So if currentLeader is null or ifcurrentLeader references an instance of OlympicFrog whose medalCount isless than the receiverís,
* then the method should set currentLeader to the receiver.)
public void jump()
for (int move = 0; move < OlympicFrog.RUN_UP; move++)
if ((OlympicFrog.currentLeader = null) || (this.getMedalCount() > OlympicFrog.currentLeader.getMedalCount()))
this.OlympicFrog = OlympicFrog.currentLeader;