Answers for "java program to calculate age from year of birth and current year"

11

java program to calculate age from date of birth

LocalDate today = LocalDate.now();
LocalDate birthday = LocalDate.of(1987, 09, 24);

Period period = Period.between(birthday, today);

//Now access the values as below
System.out.println(period.getDays());
System.out.println(period.getMonths());
System.out.println(period.getYears());
Posted by: Guest on July-23-2020

Code answers related to "java program to calculate age from year of birth and current year"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language