SupportWriter space ↗
REFERENCE LIBRARY

References from other publishers

Republished articles with source attribution. This collection is separate from Diary Coding’s original guides and does not display ads.

Read original guides → · Editorial policy

FOR YOUR CURIOSITY

Latest notes.

JAVA 8 / NOTES</>↗
Java 817 Jan 2024

How do I use java.time.temporal.TemporalAdjusters class?

The java.time.temporal.TemporalAdjuster interface and the java.time.temporal.TemporalAdjusters class are both part of the Java Date-Time API, and they work together for adjusting temporal objects. TemporalAdjuster interface: This is a functional interface, which means it has only one abstract method, adjustInto(). This method is meant to adjust a temporal object, such as LocalDate, LocalDateTime, YearMonth, etc. The […]

Wayan · 5 min read
JAVA 8 / NOTES</>↗
Java 817 Jan 2024

How do I use java.time.Duration class?

java.time.Duration is another useful class in Java for dealing with time. It measures time in seconds and nanoseconds and is most suitable for smaller amounts of time, like “20 seconds” or “3 hours”, and not for larger units like “3 days” or “4 months”. Here’s a guide on how to use it: 1. Creating a […]

Wayan · 2 min read
JAVA 8 / NOTES</>↗
Java 817 Jan 2024

How do I use java.time.Period class?

java.time.Period is a class that represents a quantity or amount of time in terms of years, months, and days. Here’s a brief guide on how to use it: 1. Creating a Period instance The Period class provides several static methods named of() and between() to create an instance. To create Period of 1 year, 2 […]

Wayan · 2 min read
JAVA 8 / NOTES</>↗
Java 817 Jan 2024

How do I use ChronoUnit enumeration?

ChronoUnit is an enumeration that provides static constants representing the units of time in the date-time API in Java. These constants include DAYS, HOURS, SECONDS, etc., that are often used to measure a quantity of time with respect to the specifics of a calendar system. Here’s an example of how you can use the ChronoUnit […]

Wayan · 2 min read
JAVA 8 / NOTES</>↗
Java 817 Jan 2024

How do I use plus and minus method in the Java Date-Time API?

In the Java Date-Time API, the plus and minus methods can be used to calculate and modify dates, times, date/times, and durations. Each temporal class (LocalDate, LocalTime, LocalDateTime, and Duration) includes these methods. Here’s a basic example using the LocalDate class: package org.kodejava.datetime; import java.time.LocalDate; public class PlusMinusExample { public static void main(String[] args) { […]

Wayan · 4 min read
JAVA 8 / NOTES</>↗
Java 815 Jan 2024

How do I use atDate() method of Java Date-Time API?

The atDate() method is a part of LocalTime class in the Java Date-Time API. This method combines this time with a date to create an instance of LocalDateTime. Here’s an example: package org.kodejava.datetime; import java.time.LocalDate; import java.time.LocalDateTime; import java.time.LocalTime; public class AtDateExample { public static void main(String[] args) { // Create a LocalTime instance LocalTime […]

Wayan · 1 min read
✳

Knowledge grows when shared.

Stay curious. There is always something new to learn.

Explore notes ↗
Putu Adi Guna Permana
ABOUT THE AUTHOR

Dr (C). Ir. Putu Adi Guna Permana, S.Kom., M.Kom., IPM., ASEAN Eng.

Writer and founder of Diary Coding — sharing notes, tutorials, and experiences about programming for anyone who wants to keep learning.