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 API19 May 2007

How do I use the HashMap class?

This example demonstrate you how to use the HashMap class to store values in a key-value structure. In this example we store a map of error codes with their corresponding description. To store a value into the map we use the put(key, value) method and to get it back we use the get(key) method. And […]

Wayan · 1 min read
CORE API / NOTES</>↗
Core API16 May 2007

How do I generate a random array of numbers?

Using java.util.Random class we can create random data such as boolean, integer, floats, double. First you’ll need to create an instance of the Random class. This class has some next***() methods that can randomly create the data. package org.kodejava.util; import java.util.Arrays; import java.util.Random; public class RandomDemo { public static void main(String[] args) { Random r […]

Wayan · 2 min read
CORE API / NOTES</>↗
Core API11 May 2007

How do I reverse a string by word?

In the other examples on this website you might have seen how to reverse a string using StringBuffer, StringUtils from Apache Commons Lang library or using the CharacterIterator. In this example you’ll see another way that you can use to reverse a string by word. Here we use the StringTokenizer and the Stack class. package […]

Wayan · 1 min read
CORE API / NOTES</>↗
Core API07 May 2007

How do I convert varargs to an array?

Varargs can be seen as a simplification of array when we need to pass a multiple value as a method parameter. Varargs itself is an array that automatically created, for these reason you will be enabled to do things you can do with array to varargs. In the example below you can see the messages […]

Wayan · 1 min read
CORE API / NOTES</>↗
Core API02 May 2007

How do I remove trailing white space from a string?

The trim() method of a String class removes both leading and trailing white space from a string. In this example we use a regular expression to remove only the trailing white spaces from a string. package org.kodejava.lang; public class TrailingSpace { public static void main(String[] args) { String text = " tattarrattat "; System.out.println("Original = […]

Wayan · 1 min read
CORE API / NOTES</>↗
Core API27 Apr 2007

How do I remove leading white space from a string?

The trim() method of a String class removes both leading and trailing white space from a string. In this example we use a regular expression to remove only the leading white spaces from a string. package org.kodejava.lang; public class LeadingSpace { public static void main(String[] args) { String text = " tattarrattat "; System.out.println("Original = […]

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.