Check out example codes for "java age from date". It will help you in understanding the concepts better.

Code Example 1

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());

Learn ReactJs, React Native from akashmittal.com