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 DATE TIME API / NOTES</>↗
Java Date Time API08 Aug 2025

How to Check If a Date Is Weekend in Java

Here are simple and reliable ways to check whether a date falls on a weekend in Java. Prefer the modern java.time API (Java 8+), which is clearer and thread-safe. Using LocalDate (recommended) import java.time.DayOfWeek; import java.time.LocalDate; public class WeekendChecker { public static boolean isWeekend(LocalDate date) { DayOfWeek dow = date.getDayOfWeek(); return dow == DayOfWeek.SATURDAY || […]

Wayan · 2 min read
JAVA DATE TIME API / NOTES</>↗
Java Date Time API07 Aug 2025

How to Convert Between Date and LocalDateTime

In Java, you can convert between java.util.Date and java.time.LocalDateTime using the java.time API introduced in Java 8. Here’s how you can perform the conversions: 1. Converting Date to LocalDateTime You need to use java.time.Instant and java.time.ZoneId to make this conversion. Here’s the process: package org.kodejava.datetime; import java.time.LocalDateTime; import java.time.ZoneId; import java.util.Date; public class DateToLocalDateTimeExample { […]

Wayan · 2 min read
JAVA DATE TIME API / NOTES</>↗
Java Date Time API06 Aug 2025

How to Calculate Date Differences Using ChronoUnit

You can calculate date differences in Java using the ChronoUnit enum from the java.time package. The ChronoUnit class is used to measure the amount of time between two temporal objects (e.g., LocalDate, LocalDateTime, etc.) in terms of specific time units like DAYS, MONTHS, YEARS, etc. Here’s an example of how to calculate the difference between […]

Wayan · 3 min read
IO / NOTES</>↗
IO05 Aug 2025

How to Read Binary Files into Byte Arrays

To read a binary file into a byte array in Java, you can use various ways such as Files.readAllBytes(), FileInputStream, or DataInputStream. Below is an explanation of the most common methods. Using Files.readAllBytes() (Java NIO) This is the simplest and most efficient way if you’re using Java 7 or later. The Files.readAllBytes() method reads all […]

Wayan · 3 min read
PLANTUML / NOTES</>↗
PlantUML04 Aug 2025

How to Create Class Diagrams with PlantUML for Clear Object-Oriented Design

PlantUML is a powerful tool to create class diagrams that help in visualizing and designing object-oriented software. Below is a comprehensive guide to creating class diagrams with PlantUML for clear object-oriented design. 1. What is PlantUML? PlantUML is a text-based tool for creating UML (Unified Modeling Language) diagrams. It uses simple plain-text descriptions to generate […]

Wayan · 4 min read
JAVA DATE TIME API / NOTES</>↗
Java Date Time API03 Aug 2025

How to Format Dates with DateTimeFormatter

In Java (starting from Java 8), you can format dates using the DateTimeFormatter class, which provides an easier and more modern approach to date and time formatting. This class is part of the java.time.format package and works seamlessly with the java.time API (e.g., LocalDate, LocalDateTime, ZonedDateTime). Here’s how you can format dates with DateTimeFormatter: Example […]

Wayan · 5 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.