Error: Local variable assignedHour defined in an enclosing scope must be final or effectively final

Are you facing “Local variable assignedHour defined in an enclosing scope must be final or effectively final” error while trying to use local variable assignedHour that is not declared as final in the lambda expression or inside an inner class ?… Read More!

difference between two dates

Difference between two dates in Java using ChronoUnit

In this quick sneppet, you will explore java.time (Java 8) LocalDate, LocalDateTime, ZonedDateTime and ChronoUnit to find difference between two dates. ChronoUnit is the implementation class of java.time.TemporalUnit interface. The most commonly used units are defined in ChronoUnit e.g., WEEKS,… Read More!