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.

CORE API / CATATAN</>
Core API01 Mei 2006

How do I split a string?

Prior to Java 1.4 we use java.util.StringTokenizer class to split a tokenized string, for example a comma separated string. Starting from Java 1.4 and later the java.lang.String class introduce a String.split(String regex) method that simplify this process. Below is a code snippet how to do it. package org.kodejava.lang; import java.util.Arrays; public class StringSplit { public […]

Wayan · 1 menit baca
CORE API / CATATAN</>
Core API30 Apr 2006

How do I execute other applications from Java?

The following program allows you to run / execute other application from Java using the Runtime.exec() method. package org.kodejava.lang; import java.io.IOException; public class RuntimeExec { public static void main(String[] args) { //String command = "/Applications/Safari.app/Contents/MacOS/Safari"; String command = "explorer.exe"; try { Process process = Runtime.getRuntime().exec(new String[]{command}); } catch (IOException e) { e.printStackTrace(); } } }

Wayan · 1 menit baca
CORE API / CATATAN</>
Core API29 Apr 2006

How do I get path / classpath separator?

OS platform has a different symbol used for path separator. Path separator is a symbol that separate one path element from the other. In Windows the path separator is a semicolon symbol (;), you have something like: .;something.jar;D:/libs/commons.jar While in Linux based operating systems the path separator is a colon symbol (:), it looks like: […]

Wayan · 1 menit baca
SWING / CATATAN</>
Swing27 Apr 2006

How do I make a centered JFrame?

If you have a JFrame in your Java Swing application and want to center its position on the screen you can use the following code snippets. The first way is to utilize java.awt.Toolkit class to get the screen size. The getScreenSize() method return a java.awt.Dimension from where we can get the width and height of […]

Wayan · 2 menit baca
CORE API / CATATAN</>
Core API23 Apr 2006

How do I get environment variables?

Environment variables are a set of dynamic values that can affect a running process, such as our Java program. Each process usually have their own copy of these variables. Now we would like to obtain the available variables in our environment or operating system, how do I do this in Java? Here is a code […]

Wayan · 2 menit baca
JDBC / CATATAN</>
JDBC20 Apr 2006

How do I insert a record into database table?

In this example you’ll learn how to create a program to insert data into a database table. To insert a data we need to get connected to a database. After a connection is obtained you can create a java.sql.Statement object from it, and using this object we can execute some query strings. package org.kodejava.jdbc; import […]

Wayan · 2 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.