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.

APACHE COMMONS / NOTES</>↗
Apache Commons19 Oct 2007

How do I format date and time using DateFormatUtils class?

The DateFormatUtils class help us to format date and time information. This class uses an instance of org.apache.commons.lang3.time.FastDateFormat class to format the date and time information. Compared to Java SimpleDateFormat, the FastDateFormat class is thread safe. If you want to create a custom date format, you can use the FastDateFormat class directly. package org.kodejava.commons.lang; import […]

Wayan · 2 min read
APACHE COMMONS / NOTES</>↗
Apache Commons14 Oct 2007

How do I find specific elements or object in an array?

This example demonstrates how to find specific items in an array. We will use the org.apache.commons.lang3.ArrayUtils class. This class provides method called contains(Object[] array, Object objectToFind) method to check if an array contains the objectToFind in it. We can also use the indexOf(Object[] array, Object objectToFind) method and the lastIndexOf(Object[] array, Object objectToFind) method to […]

Wayan · 2 min read
APACHE COMMONS / NOTES</>↗
Apache Commons10 Oct 2007

How do I use CompareToBuilder class?

This example show how we can use the CompareToBuilder class for automatically create an implementation of compareTo(Object o) method. Please remember, when you are implementing this method, you will also need to implement the equals(Object o) method consistently. This will make sure the behavior of your class is consistent in relation to collection sorting processes. […]

Wayan · 2 min read
APACHE COMMONS / NOTES</>↗
Apache Commons10 Oct 2007

How do I use ReflectionToStringBuilder class?

Implementing toString() method sometimes can become a time-consuming process. If you have a class with a few fields, it might be alright. However, when you deal with a lot of fields, it will surely take some time to update this method every time a new field comes and goes. Here comes the ReflectionToStringBuilder class that […]

Wayan · 2 min read
CORE API / NOTES</>↗
Core API07 Oct 2007

How do I read system property as an integer?

The Integer.getInteger() methods allows us to easily read system property and convert it directly to Integer object. This method call the System.getProperty() method and then convert it to integer by calling the Integer.decode() method. package org.kodejava.lang; public class IntegerProperty { public static void main(String[] args) { // Add properties to the system. In this example […]

Wayan · 1 min read
CORE API / NOTES</>↗
Core API04 Oct 2007

How do I decode string to integer?

The static Integer.decode() method can be used to convert a string representation of a number into an Integer object. Under the cover this method call the Integer.valueOf(String s, int radix). The string can start with the optional negative sign followed with radix specified such as 0x, 0X, # for hexadecimal value, 0 (zero) for octal […]

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.