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.

CORE API / NOTES</>↗
Core API06 Jun 2006

How do I get a list of weekday names?

The example code below helps you to get all weekday names as an array of string. The first method, getWeekdays() return the full name string while the second method getShortWeekdays() return the short name of the weekday. package org.kodejava.text; import java.text.DateFormatSymbols; public class WeekdayNames { public static void main(String[] args) { DateFormatSymbols dfs = new […]

Wayan · 1 min read
CORE API / NOTES</>↗
Core API05 Jun 2006

How do I get a list of month names?

The example code below helps you to get all month names as an array of String. The first method, getMonths() return the full name string while the second method getShortMonths() return the short name of the month. package org.kodejava.text; import java.text.DateFormatSymbols; import java.util.Locale; public class MonthNames { public static void main(String[] args) { String[] months […]

Wayan · 1 min read
CORE API / NOTES</>↗
Core API02 Jun 2006

How do I convert primitive boolean type into Boolean object?

The following code snippet demonstrate how to use the Boolean.valueOf() method to convert primitive boolean value or a string into Boolean object. This method will return the corresponding Boolean object of the given primitive boolean value. When a string value is passed to this method it will return Boolean.TRUE when the string is not null, […]

Wayan · 2 min read
CORE API / NOTES</>↗
Core API29 May 2006

Can I create a boolean variable from string?

To convert a string into boolean we can use the Boolean.parseBoolean(String) method. If we pass a non null value that equals to true, ignoring case, this method will return true value. Given other values it will return a false boolean value. package org.kodejava.lang; public class BooleanParseExample { public static void main(String[] args) { // Parsing […]

Wayan · 1 min read
CORE API / NOTES</>↗
Core API28 May 2006

How do I delete a file in Java?

In this example you will see how to delete a file in Java. To delete a file we start by creating a File object that represent the file to be deleted. We use the exists() method to check if the file is exists before we try to delete it. To delete the file we call […]

Wayan · 1 min read
CORE API / NOTES</>↗
Core API25 May 2006

How do I get IP address of localhost?

The example here show you how to get an IP or host address using the java.net.InetAddress class. To get an instance of InetAddress we call a static method of this class, the method is getLocalHost(), which return the local host address. Next, to get the IP address we can call the getHostAddress() method. package org.kodejava.net; […]

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.