In Java8, we can use following classes to find date time differences : Period Duration ChronoUnit Period We can use Period class to calculate difference in year, month, days between two Dates. Here is an example of using Period class methods getYears(), getMonths() and getDays() to calculate age of a person. package com.topjavatutorial; import […]
