You have two options.
You can store the return value of the method in a boolean variable, and then use that variable as the test in the if statement....
boolean isALeapYear = isLeapYear(year); // or whatever variable stores the year
if (isALeapYear){
......
OR
since the isLeapYear method return true or false, you can use the call to isLeapYear as the test in the if statement directly (which is preferable and in the slides how the isPrime method was called)
if (isLeapYear(year)){
......