Playback starts YouTube’s embedded player (privacy-enhanced mode).
Java Program to check if year is a LEAP year or Not | Java Tutorials for Beginners
ChannelSimple SnippetsDescription from the creator
Support Simple Snippets by Donations -
Google Pay UPI ID - tanmaysakpal11@okicici
PayPal - paypal.me/tanmaysakpal11
--------------------------------------------------------------------------------------------- In this java programming tutorial we will write a program to check if a year is LEAP year or not.
Concept of Leap Year -
The rule states:
“Every year that is exactly divisible by four is a leap year, except for years that are exactly divisible by 100, but these centurial years are leap years if they are exactly divisible by 400.”
For example,
if year = 2400, it is leap year,(Condition 1 satisfied)
but if year = 2200, is NOT a leap year, (Cond. 2 not satisfied),
and if year = 2020, is a leap year, (Cond. 2 satisfied).
To check whether a year is a leap year or not, you need to check the following 3 conditions:
IF
1. Any year that is divisible by 400 is definitely a leap year.
ELSE IF
2. If divisible by 4 AND not divisible by 100 then a leap year.
ELSE
not a leap year.
Java Leap Year Program Code with Output - simplesnippets.tech/java-program-to-check-if-ye…
Download the FREE Java Programming Android App from Google Playstore - play.google.com/store/apps/details?id=com.intel…
Simple Snippets Official Website -
simplesnippets.tech/
Simple Snippets on Facebook-
facebook.com/simplesnippets/
Simple Snippets on Instagram-
instagram.com/simplesnippets/
Simple Snippets Google Plus Page-
plus.google.com/+SimpleSnippets
Simple Snippets email ID-
[email protected]
Google Pay UPI ID - tanmaysakpal11@okicici
PayPal - paypal.me/tanmaysakpal11
--------------------------------------------------------------------------------------------- In this java programming tutorial we will write a program to check if a year is LEAP year or not.
Concept of Leap Year -
The rule states:
“Every year that is exactly divisible by four is a leap year, except for years that are exactly divisible by 100, but these centurial years are leap years if they are exactly divisible by 400.”
For example,
if year = 2400, it is leap year,(Condition 1 satisfied)
but if year = 2200, is NOT a leap year, (Cond. 2 not satisfied),
and if year = 2020, is a leap year, (Cond. 2 satisfied).
To check whether a year is a leap year or not, you need to check the following 3 conditions:
IF
1. Any year that is divisible by 400 is definitely a leap year.
ELSE IF
2. If divisible by 4 AND not divisible by 100 then a leap year.
ELSE
not a leap year.
Java Leap Year Program Code with Output - simplesnippets.tech/java-program-to-check-if-ye…
Download the FREE Java Programming Android App from Google Playstore - play.google.com/store/apps/details?id=com.intel…
Simple Snippets Official Website -
simplesnippets.tech/
Simple Snippets on Facebook-
facebook.com/simplesnippets/
Simple Snippets on Instagram-
instagram.com/simplesnippets/
Simple Snippets Google Plus Page-
plus.google.com/+SimpleSnippets
Simple Snippets email ID-
[email protected]
About this tutorial
Simple Snippets published this 7:42 video tutorial on November 10, 2018. It has been watched 31,413 times on YouTube.
- Channel
- Simple Snippets
- Category
- Education
- Duration
- 7:42
- Published
- November 10, 2018
- Views
- 31,413
- Likes
- 523
Tags
Share
This tutorial in other languages
- FRProgramme Java pour vérifier si l'année est une année bissextile ou non | Java Tutoriels pour les débutants
- ESPrograma Java para comprobar si el año es un año bisiesto o no | Java tutoriales para principiantes
- PTPrograma Java para verificar se o ano é um ano bissexto ou não | Java Tutoriais para Iniciantes
- ITProgramma Java per controllare se l'anno è un anno bisestile o no | Java Tutorial per principianti
- DEJava-Programm zu überprüfen, ob ein Jahr LEAP Jahr ist oder nicht | Java Tutorials für Anfänger
- NLJava-programma om te controleren of jaar een schrikkeljaar is of niet | Java Tutorials voor beginners
- RUJava программы для проверки, если год високосный год или нет | Java учебники для начинающих
- PLProgram Java, aby sprawdzić, czy rok jest rokiem przestępnym czy nie | Java Poradniki dla początkujących
- JA年がうるう年であるかどうかのJavaプログラムがチェックします|初心者のためのJavaのチュートリアル
- ARبرنامج جافا لمعرفة ما اذا كان العام هو عام LEAP أو لا | جافا دروس للمبتدئين
- HIअगर एक साल से लीप वर्ष है या नहीं जावा कार्यक्रम की जांच करने के | शुरुआती के लिए जावा ट्यूटोरियल
- IDProgram Java untuk memeriksa apakah tahun adalah tahun LEAP atau Tidak | Java Tutorial untuk Pemula