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 API12 Sep 2009

How do I count the number of occurrences of a char in a String?

This example show you how to count the number of a character occurrences in a string. We show two ways to do it, using the String.replaceAll(String regex, String replace) method and creating a loop that check every char in the String and count the matched char. package org.kodejava.lang; public class CharCounter { public static void […]

Wayan · 2 menit baca
APACHE COMMONS / CATATAN</>
Apache Commons07 Sep 2009

How do I get the content of an InputStream as a String?

We can use the code below to convert the content of an InputStream into a String. At first, we use FileInputStream create to a stream to a file that going to be read. IOUtils.toString(InputStream input, String encoding) method gets the content of the InputStream and returns a string representation of it. package org.kodejava.commons.io; import org.apache.commons.io.IOUtils; […]

Wayan · 1 menit baca
APACHE COMMONS / CATATAN</>
Apache Commons03 Sep 2009

How do I create a web based file upload?

This example using the Apache Commons FileUpload library to create a simple application for uploading files. The program is divided into two parts, a form using JSP and a servlet for handling the upload process. To run the sample you need to download the Commons FileUpload and Commons IO get the latest stable version. The […]

Wayan · 4 menit baca
CORE API / CATATAN</>
Core API30 Agt 2009

How do I count number of weekday between two dates?

The code below helps you find the number of a specified weekday (Monday, Tuesday, Wednesday, etc.) between two dates. The solution we used below is to loop between the two dates and check if the weekday of those dates are equals to the day we want to count. package org.kodejava.util; import java.util.Calendar; public class DaysBetweenDate […]

Wayan · 1 menit baca
SWING / CATATAN</>
Swing27 Agt 2009

How do I set Swing Timer initial delay?

The Swing javax.swing.Timer object fires the action event after the delay time specified in the constructor passed. For some reasons you might want the Timer class fires immediately after it was started. To achieve this you can set the timer initial delay by calling the setInitialDelay(int initialDelay) method. The example below give you an example […]

Wayan · 2 menit baca
SWING / CATATAN</>
Swing25 Agt 2009

How do I use Swing Timer class?

In this example you’ll see how to use java.swing.Timer class to create a text clock program. package org.kodejava.swing; import javax.swing.*; import java.awt.*; import java.util.Calendar; import java.text.DateFormat; import java.text.SimpleDateFormat; public class TimerDemo extends JFrame { public static final DateFormat df = new SimpleDateFormat("hh:mm:ss"); public TimerDemo() throws HeadlessException { initUI(); } public static void main(String[] args) { […]

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.