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 API11 Jan 2007

How do I iterate a subset of a string?

package org.kodejava.text; import java.text.CharacterIterator; import java.text.StringCharacterIterator; public class IterateSubstringExample { private static final String text = "How razorback-jumping frogs can level six piqued gymnasts"; public static void main(String[] args) { CharacterIterator it = new StringCharacterIterator(text, 4, 27, 5); // In this loop we just iterator a subset of character defined in the // StringCharacterIterator above. […]

Wayan · 1 menit baca
CORE API / CATATAN</>
Core API08 Jan 2007

How do I reverse a string using CharacterIterator?

In this example we use the java.text.CharacterIterator implementation class java.text.StringCharacterIterator to reverse a string. It’s done by reading a string from the last index up to the beginning of the string. package org.kodejava.text; import java.text.CharacterIterator; import java.text.StringCharacterIterator; public class StringCharacterIteratorReverseExample { private static final String text = "Jackdaws love my big sphinx of quartz"; public […]

Wayan · 1 menit baca
CORE API / CATATAN</>
Core API05 Jan 2007

How do I iterate each character of a string?

The following example show you how to iterate each character of a string using the java.text.CharacterIterator and java.text.StringCharacterIterator to count the number of vowels and consonants in the string. package org.kodejava.text; import java.text.CharacterIterator; import java.text.StringCharacterIterator; public class StringCharacterIteratorExample { private static final String text = "The quick brown fox jumps over the lazy dog"; public […]

Wayan · 1 menit baca
JDBC / CATATAN</>
JDBC01 Jan 2007

How do I disable auto-commit mode in JDBC?

The code snippet below shows you how to disable auto-commit operation when executing JDBC commands or queries. package org.kodejava.jdbc; import java.sql.*; public class AutoCommitSettingExample { private static final String URL = "jdbc:mysql://localhost/kodejava"; private static final String USERNAME = "kodejava"; private static final String PASSWORD = "s3cr*t"; public static void main(String[] args) { // DO: Get […]

Wayan · 2 menit baca
SERVLET / CATATAN</>
Servlet28 Des 2006

How do I read text file in Servlet?

This example show you how to read a text file in a servlet. Using the ServletContext.getResourceAsStream() method will enable you to read a file whether the web application is deployed in an exploded format or in a war file archive. The following servlet read the configuration.properties file from the /WEB-INF directory in our web application. […]

Wayan · 2 menit baca
CORE API / CATATAN</>
Core API28 Des 2006

How do I create a scheduled task using timer?

This example show you how to create a simple class for scheduling a task using Timer and TimerTask class. package org.kodejava.util; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Timer; import java.util.TimerTask; public class TimerExample extends TimerTask { private final DateFormat formatter = new SimpleDateFormat("hh:mm:ss a"); public static void main(String[] args) { // Create an instance […]

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.