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 831 Jan 2016

How do I convert between old Date and Calendar object with the new Java 8 Date Time?

In this example we will learn how to convert the old java.util.Date and java.util.Calendar objects to the new Date Time introduced in Java 8. The first method in the code snippet below dateToNewDate() show conversion of java.util.Date while the calendarToNewDate() show the conversion of java.util.Calendar. The java.util.Date and java.util.Calendar provide a toInstant() method to convert […]

Wayan · 5 min read
JAVA DATE TIME API / NOTES</>↗
Java Date Time API29 Jan 2016

How do I add or subtract date in Java 8?

The new Java 8 java.time.LocalDate class provide a plus() and minus() methods to add or subtract an amount of period to or from the LocalDate object. The period is represented using the java.time.Period class. To create an instance of Period we can use the of(), ofDays(), ofWeeks(), ofMonths() and ofYears() methods. Let’s see an example […]

Wayan · 3 min read
JAVA 8 / NOTES</>↗
Java 821 Jan 2016

How do I calculate difference between two dates?

In this example you’ll learn how to use the java.time.Period class (from Java 8) to calculate difference between two dates. Using Period.between() method will give us difference between two dates in years, months and days period. Beside using the Period class, we also use the ChronoUnit enum to calculate difference between two dates. We use […]

Wayan · 2 min read
GRADLE / NOTES</>↗
Gradle21 Dec 2015

How do I install Gradle in Mac OS X?

In this post we will learn how to install Gradle in OS X. The following steps will guide our installation process to make Gradle available in our OS X machine. But before we start let’s take a look at the definition from wikipedia about Gradle. Gradle is an open source build automation system that builds […]

Wayan · 3 min read
CORE API / NOTES</>↗
Core API20 Dec 2015

How do I implement equals() and hashCode() method using java.util.Objects?

This example will show you how to implement the equals() and hashCode() object using java.util.Objects class. The Objects class provides a set of utility methods to work with object such as comparing two objects for equality and calculating the hashcode. Other methods include object null check methods, object to string method, etc. To demonstrate equals() […]

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