Java program that tells if a year is a leap year or not
import java.util.Scanner;
public class TestApp {
Scanner console = new Scanner(System.in);
public static void main(String[] args)
{
int year;
System.out.print("Input the year: ");
year = console.nextInt();
if (year%4 == 0)
{
System.out.println(year + " is a leap year");
}
else
{
System.out.println(year + " is not a leap year");
}
}
}
#codingriver
#javaprogramsexamples
#javaprogrammingbasics
On this page of the site you can watch the video online Java program - Determines Whether a Year a Leap Year Or Not with a duration of hours minute second in good quality, which was uploaded by the user Career & Tech HQ 14 September 2020, share the link with friends and acquaintances, this video has already been watched 782 times on youtube and it was liked by 11 viewers. Enjoy your viewing!