// Leap.java - The user supplies the year as a command-line argument, // and we determine if it's a leap year or not. // The purpose of this program is to illustrate boolean variables and // operations. public class Leap { public static void main(String [] args) { int year = Integer.parseInt(args[0]); boolean isLeapYear = (year % 400 == 0) || (year % 100 != 0 && year % 4 == 0); System.out.println(isLeapYear); } }