Leap Year game in Java
Regardless of your algorithm, you can simplify it much more with a simple if or switch.

int years = leapyear%4;
switch( years ) {
  case 0: 
    println("Yeeees!");
    break;
  case 1:
    println("1 year later there is a leapyear.");
    break;
  default:
    println((4-years)+" years later there is a leapyear.");
    break;
}


But I doubt that this is a good practising exercise:

Do you have an unit test for it ? If you had to create one, how could you test the result since it is printed to the console.

How could you improve this code to make it testable and extendable. What could you do if I want to print another message ?