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.

SECURITY / CATATAN</>
Security16 Mei 2016

How do I generate random string?

package org.kodejava.security; import java.security.SecureRandom; import java.util.Random; public class RandomString { public static final String SOURCES = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890"; public static void main(String[] args) { RandomString rs = new RandomString(); System.out.println(rs.generateString(new Random(), SOURCES, 10)); System.out.println(rs.generateString(new Random(), SOURCES, 10)); System.out.println(rs.generateString(new Secure...

Wayan · 1 menit baca
CORE API / CATATAN</>
Core API18 Mar 2016

How to check if an object reference is not null?

Usually, if not always, we use the if statement combined with == or != operators to check if an object reference is null or not. We do this to validate arguments passed to constructors or methods doesn’t contain a null value. These null check can be seen as clutter in our code. The solution is […]

Wayan · 3 menit baca
JAVA DATE TIME API / CATATAN</>
Java Date Time API09 Mar 2016

How do I create a custom TemporalAdjuster?

In this example we are going to learn how to implement a custom TemporalAdjuster. We are going to create TemporalAdjuster to find the next working day from a specified date. We will use 5 working days, from Monday to Friday. The custom temporal adjuster class should implement the TemporalAdjuster interface, which define a single method […]

Wayan · 2 menit baca
CORE API / CATATAN</>
Core API07 Mar 2016

Using format flags to format negative number in parentheses

In this example we are going to learn to use a java.util.Formatter to format negative number in parentheses. The Formatter can use a format flags to format a value. To display a negative number in parentheses we can use the ( flag. This flag display negative number inside parentheses instead of using the – symbol. […]

Wayan · 2 menit baca
JAVA 8 / CATATAN</>
Java 806 Mar 2016

How do I manipulate LocalDate object using TemporalAdjuster?

In the previous example we manipulate the value of LocalDate by adding or subtracting the value of date object by days, months, years using methods like plusMonths() or minusDays(). Or by changing the year or the month of the date object using methods like withYear() or withMonth(). But there are times that we want to […]

Wayan · 3 menit baca
MAVEN / CATATAN</>
Maven29 Feb 2016

How do I install third-party libraries in Maven repository?

Sometimes when the required libraries / dependencies is not available in the Maven Central Repository we need to manually install it to our local repository. This library must be placed in the correct directory in our local repository to enable Maven to find it. The default location is under the ${user.home}/.m2/repository. To make this job […]

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.