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 API22 Sep 2006

How do I format a number?

If you want to display some numbers that is formatted to a certain pattern, either in a Java Swing application or in a JSP file, you can utilize NumberFormat and DecimalFormat class to give you the format that you want. Here is a small example that will show you how to do it. In the […]

Wayan · 2 menit baca
CORE API / CATATAN</>
Core API19 Sep 2006

How do I convert string of time to time object?

You want to convert a string representing a time into a time object in Java. As we know that Java represents time information in a class java.util.Date, this class keep information for date and time. Now if you have a string of time like 15:30:18, you can use a SimpleDateFormat object to parse the string […]

Wayan · 2 menit baca
CORE API / CATATAN</>
Core API16 Sep 2006

How do I use LineNumberReader class to read file?

In this example we use LineNumberReader class to read file contents. What we try to do here is to get the line number of the read data. Instead of introducing another variable; an integer for instance; to keep track the line number we can utilize the LineNumberReader class. This class offers the getLineNumber() method to […]

Wayan · 2 menit baca
CORE API / CATATAN</>
Core API12 Sep 2006

How do I get user home directory name?

package org.kodejava.lang; public class UserHomeExample { public static void main(String[] args) { // This is the key that we used to obtain user home directory // in the operating system String userHome = "user.home"; // We get the path by getting the system property with the // defined key above. String path = System.getProperty(userHome); // […]

Wayan · 1 menit baca
CORE API / CATATAN</>
Core API09 Sep 2006

How do I get operating system name and version?

package org.kodejava.lang; public class OperatingSystemInfo { public static void main(String[] args) { // The key for getting operating system name String name = "os.name"; // The key for getting operating system version String version = "os.version"; // The key for getting operating system architecture String architecture = "os.arch"; System.out.println("Name : " + System.getProperty(name)); System.out.println("Version: " […]

Wayan · 1 menit baca
CORE API / CATATAN</>
Core API07 Sep 2006

How do I add a delay in my program?

You have a problem that you want to add a delay for a couple of seconds in your program. Using Thread.sleep() method we can add delay in our application in a millisecond time. The Thread.sleep() need to be executed inside a try-catch block, and we need to catch the InterruptedException. Let’s see the code snippet […]

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.