I am making a scanner object to get a year and test to see if it is a leap year. Just want some feedback. Is this right what I have? Thank you!
import java.util.Scanner;
public class Micro4
{
public static void main(String[] args)
{
Scanner input = new Scanner(System.in);
int testDate = input.nextInt();
boolean divFour = (((testDate % 4) == 0));
boolean divHundred = (((testDate % 100) != 0));
boolean divFourHundred = (((testDate % 400) != 0));
if (divFour && divHundred && divFourHundred) {
System.out.println(testDate + " is a leap year.");
} else {
System.out.println(testDate + " is not a leap year.");
}
}
}