I am not able to get this to validate. (I have written this several different ways, using the help examples, and at this point I am wondering if I am not understanding the conditions at all.) Thank you
package com.codegym.task.task04.task0414;
/*
Number of days in the year
*/
import java.io.*;
public class Solution {
public static void main(String[] args) throws Exception {
BufferedReader buf = new BufferedReader(new InputStreamReader(System.in));
String s= buf.readLine();
int y = Integer.parseInt(s);
//if (year is not divisible by 4) then (it is a common year)
if (y % 4 != 0){
System.out.println("Number of days in the year: 365");
}
//else if (year is not divisible by 100) then (it is a leap year)
else if (y % 100 != 100){
System.out.println("Number of days in the year: 366");
}
//else if (year is not divisible by 400) then (it is a common year)
else if (y % 400 != 400) {
System.out.println("Number of days in the year: 365");
}
//else (it is a leap year)
else {
System.out.println("Number of days in the year: 366");
}
}// end main
}// end class