Java Tutorial
- Runtime
- java 21.0.12
- Files
- 60 files · 24 KB
- Runs
- 50 runs
- Published
package sessionFour;public class LeapYear { public static void main(String[] args) { // Divisible by 4 and not by 100 // or divisible by 400 int year = 2000; boolean isLeap = (year % 4 == 0 && year % 100 != 0) || (year % 400 == 0); }}