SupportWriter space ↗
A JOURNAL ABOUT TECHNOLOGY

Learn something new.
Write. Share.

A space to connect knowledge, one line of code a day.
Discover tutorials, ideas, and notes from a learning journey.

1967 notes & counting ↙
EDITOR’S PICK ↗
Pentesting

Planning Your First Web Application Pentest: Scope, Safety, and Evidence

Build a focused web pentest plan with clear authorization, realistic objectives, controlled testing, and evidence that developers can use.

D Putu Adi Guna Permana · 3 min read
FOR YOUR CURIOSITY

Latest notes.

CORE API / NOTES</>↗
Core API23 Jul 2007

How do I use Console class to read user input?

In the previous example, How do I read user input from console using Scanner class?, we use the java.util.Scanner class to read user input. In this example we use another new class introduced in the Java 1.6, the java.io.Console class. The Console class provide methods like readLine() and readPassword(). The readPassword() method can be used […]

Wayan · 2 min read
CORE API / NOTES</>↗
Core API22 Jul 2007

How do I read user input from console using java.util.Scanner class?

In JDK 1.5 a java.util.Scanner class was introduced to handle user input in console application. This class enable us to read string, integer, long, etc. package org.kodejava.util; import java.util.Scanner; public class ScannerDemo { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); // Read string input for username System.out.print("Username: "); String username = […]

Wayan · 1 min read
CORE API / NOTES</>↗
Core API19 Jul 2007

How do I use ResourceBundle for i18n?

Creating an application for users in different regions can be hard in terms of the message format for the local region. Java provide a ResourceBundle class that help internationalize our application. To create resources for i18n (there are 18 letters between the first i and the final n) we need to create a file for […]

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

How do I convert an array of object to an array of primitive?

In the code example below we demonstrate the ArrayUtils.toPrimitive() method to convert an array of Integer object to an array of its primitive type. Besides converting an array of Integer objects, this method is overloaded to accept other types of object’s array. package org.kodejava.commons.lang; import org.apache.commons.lang3.ArrayUtils; public class ArrayObjectToPrimitiveDemo { public static void main(String[] args) […]

Wayan · 1 min read
APACHE COMMONS / NOTES</>↗
Apache Commons11 Jul 2007

How do I convert an array to a Map?

This example uses the Apache Commons Lang’s ArrayUtils.toMap() method to convert a two-dimensional array into a Map object. To convert a two-dimensional array into a Map object, each element of the two-dimensional array must be an array with at least two elements where the first element will be the key and the second element will […]

Wayan · 2 min read
APACHE COMMONS / NOTES</>↗
Apache Commons09 Jul 2007

How do I reverse array elements order?

In this example we are going to use the ArraysUtils helper class from the Apache Commons Lang library to reverse the order of array elements. The method to reverse the order of array elements is ArrayUtils.reverse() method. The ArrayUtils.reverse() method is overloaded, so we can reverse another type of array such as java.lang.Object, long, int, […]

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.