Code:
public class LpY {  
    public static void main(String[] args) {  
        int year = Integer.parseInt(args[0]);  
        boolean isLpY;  
  
        // divisible by 4  
        isLpY = (year % 4 == 0);  
  
        // divisible by 4 and not 100  
        isLpY = isLpY && (year % 100 != 0);  
  
        // divisible by 4 and not 100 unless divisible by 400  
        isLpY = isLpY || (year % 400 == 0);  
  
        System.out.println(isLpY);  
    }  
}