Ruang penulis
SEBUAH JURNAL TENTANG TEKNOLOGI

Belajar hal baru.
Tulis. Bagikan.

Ruang untuk merangkai pengetahuan, satu baris kode setiap hari.
Temukan tutorial, ide, dan catatan dari perjalanan belajar.

1914 catatan & terus bertumbuh
PILIHAN EDITOR
Java

Memahami Java Stream: olah koleksi dengan lebih ringkas

Pelajari alur filter, map, dan collect untuk mengolah data Java dengan kode yang mudah dibaca.

D Tim Diary Coding · 1 menit baca
UNTUK RASA INGIN TAHUMU

Catatan terbaru.

JDBC / CATATAN</>
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 menit baca
AWT / CATATAN</>
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 menit baca
CORE API / CATATAN</>
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 menit baca
CORE API / CATATAN</>
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 menit baca
CORE API / CATATAN</>
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 menit baca
APACHE COMMONS / CATATAN</>
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 menit baca

Pengetahuan tumbuh ketika dibagikan.

Simpan rasa ingin tahu. Selalu ada hal baru untuk dipelajari.

Jelajahi catatan ↗
Putu Adi Guna Permana
TENTANG PENULIS

Dr (C). Ir. Putu Adi Guna Permana, S.Kom., M.Kom., IPM., ASEAN Eng.

Penulis dan pendiri Diary Coding — berbagi catatan, tutorial, dan pengalaman seputar pemrograman untuk siapa pun yang ingin terus belajar.