{}
Black
66
%Off
November

Stop copy pasting code you don't actually understand

Build the coding confidence you need to become a developer companies will fight for

Stop copy pasting code you don't actually understand

Become a PRO
Become a PRO
Black
66
%Off
November

Stop copy pasting code you don't actually understand

Build the coding confidence you need to become a developer companies will fight for

Stop copy pasting code you don't actually understand

Become a PRO
Become a PRO
run-icon
Main.java
// Online Java Compiler // Use this editor to write, compile and run your Java code online import java.time.LocalDate; import java.time.Period; import java.time.temporal.ChronoUnit; class Main { public static void main(String[] args) { LocalDate startLocalDate = LocalDate.of(1975, 5 , 23); LocalDate endLocalDate = LocalDate.now(); Period peroidBetween = Period.between(startLocalDate , endLocalDate); System.out.println(peroidBetween.getYears()+" Years"); System.out.println(peroidBetween.getMonths()+" Months"); System.out.println(peroidBetween.getDays()+" Days"); long totalDays = ChronoUnit.DAYS.between(startLocalDate , endLocalDate); System.out.println("totalDays:"+totalDays+" Days"); } }
Output