I'm stuck between java.time.temporal.ChronoUnit and java.time.temporal.Temporal until. How do they work??
1 Answer
Look at the javadoc for ChronoUnit and TemporalUntit.
The ChronoUnit enum basically provides some standard TemporalUnits but other developers could implement other TemporalUnits.
For example, you can write the following code:
TemporalUnit u=ChronoUnit.DAYS; but you can also create new TemporalUnits by extending ChronoUnit.
ChronoUnitandTemporalUnitseem fairly similar, even if I completely agree that there seems not to be much effort put into this question.