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 Feb 2006

How do I convert primitive data types into String?

There are times when we want to convert data from primitive data types into a string, for instance when we want to format output on the screen or simply mixing it with other string. Using a various static method String.valueOf() we can get a string value of them. Here is the code sample: package org.kodejava.lang; […]

Wayan · 1 menit baca
CORE API / CATATAN</>
Core API11 Feb 2006

How do I create a repeated sequence of character?

This example shows you how to create a repeated sequence of characters. To do this, we use the Arrays.fill() method. This method fills an array of char with a character. package org.kodejava.util; import java.util.Arrays; public class RepeatCharacterExample { public static void main(String[] args) { char c = '*'; int length = 10; // creates a […]

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

How do I use StringTokenizer to split a string?

The code below is an example of using StringTokenizer to split a string. In the current JDK this class is discouraged to be used, use the String.split(…) method instead or using the new java.util.regex package. package org.kodejava.util; import java.util.StringTokenizer; public class StringTokenizerExample { public static void main(String[] args) { StringTokenizer st = new StringTokenizer("A StringTokenizer […]

Wayan · 1 menit baca
CORE API / CATATAN</>
Core API06 Feb 2006

How do I check a string starts with a specific word?

To test if a string starts with a specific prefix we can use the String.startsWith(String prefix) method. This method returns a boolean true as the result if the string starts with that specified prefix. The String.startsWith() method checks the prefix in case-sensitive manner. The following code snippet give us a small example how to use […]

Wayan · 2 menit baca
CORE API / CATATAN</>
Core API02 Feb 2006

How do I check a string ends with a specific word?

The String.endsWith() method can be used to check if a string ends with a specific word. It will return a boolean true if the suffix is found at the end of the string object. In this example we will start the code by creating a class called StringEndsWithExample. This class has a standard main() method […]

Wayan · 2 menit baca
CREATIONAL PATTERNS / CATATAN</>
Creational Patterns31 Jan 2006

How do I implement a Singleton pattern?

Singleton Pattern is used when we want to allow only a single instance of a class can be created inside our application. This pattern ensures that a class only have a single instance by protecting the class creation process, which can be done by defining the class constructor with private access modifier. To get an […]

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.