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.

JDBC / NOTES</>↗
JDBC15 Apr 2006

How do I create a connection to database?

This post is about an example for obtaining a connection to MySQL database. For connecting to other database all you have to do is change the url to match to url format for a particular database and of course you have to register a correct JDBC driver of the database you are using. Here are […]

Wayan · 3 min read
AWT / NOTES</>↗
AWT11 Apr 2006

How do I create a beep sound?

package org.kodejava.awt; import java.awt.*; public class BeepExample { public static void main(String[] args) { // This is the way we can send a beep audio out. Toolkit.getDefaultToolkit().beep(); } } Using Runtime.exec() method we can do something like the code snippet below to produce beep sound using powershell command. try { Process process = Runtime.getRuntime().exec( new […]

Wayan · 1 min read
CORE API / NOTES</>↗
Core API07 Apr 2006

How do I sort an array of objects?

In this example we are going to learn how to sort an array of objects. We start by using an array of String objects as can be seen in the code snippet below. We sort the contents of the array using Arrays.sort() method and print the sorted result. It was really simple. String names[] = […]

Wayan · 3 min read
CORE API / NOTES</>↗
Core API04 Apr 2006

How do I search specific value in an array?

package org.kodejava.util; import java.util.Arrays; public class ArraySearchExample { public static void main(String[] args) { // We create an array of ints where the search will be done. int[] items = {9, 5, 14, 6, 11, 28, 9, 16, 37, 3, 2}; // The Arrays.binarySearch() require us to sort the array // items before we call […]

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

How do I sort elements of an array?

package org.kodejava.util; import java.util.Arrays; public class ArraySortExample { public static void main(String[] args) { // An array of random numbers int[] numbers = {3, 1, 8, 34, 1, 2, 13, 89, 5, 21, 55}; System.out.println("Before: " + Arrays.toString(numbers)); // We need to sort these array elements into a correct order // from the smallest to […]

Wayan · 1 min read
APACHE COMMONS / NOTES</>↗
Apache Commons01 Apr 2006

How do I convert an array of primitives into an array of objects?

To convert from primitive arrays into object type arrays, we can use the Apache Commons Lang library. The Commons Lang provides an ArrayUtils class that does this conversion. To convert the other way just use the toPrimitive() method. package org.kodejava.commons.lang; import org.apache.commons.lang3.ArrayUtils; public class ArrayPrimitiveObjectConversionDemo { public static void main(String[] args) { int[] numbers = […]

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.