Question: how to calculate age in years months and days in java?
Answer: Get the date of birth from the user.
Convert it to LocalDate object.
Get the current date (as LocalDate object)
Find the period between these two dates using the between() method as −