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.

IO / CATATAN</>
IO31 Des 2025

How do I use Files.newBufferedReader() with try-with-resources?

Using Files.newBufferedReader with a try-with-resources block is the best practice for reading files in Java. Since BufferedReader implements AutoCloseable, the try-with-resources statement ensures that the file handle is automatically closed when the block is finished, even if an exception occurs. Here is how you can implement it: Basic Usage This is the simplest way to […]

Wayan · 2 menit baca
IO / CATATAN</>
IO31 Des 2025

How do I read large files with streams?

Reading large files in Java efficiently is best achieved by using Stream-based APIs that process the file line-by-line or chunk-by-chunk. This prevents loading the entire file into memory (preventing OutOfMemoryError). Here are the most common and efficient ways to do this: 1. Using Files.lines() (Recommended) This is the most modern and idiomatic way in Java. […]

Wayan · 3 menit baca
IO / CATATAN</>
IO30 Des 2025

How do I use NIO Path.of() instead of Paths.get()?

In Java 11 and later, Path.of() is the preferred way to create Path instances, effectively replacing Paths.get(). Here is how you can use it: 1. Basic Usage (Replacing Paths.get) The syntax is almost identical. It accepts a string or a sequence of strings to join into a path. package org.kodejava.nio; import java.nio.file.Path; public class PathExample […]

Wayan · 2 menit baca
IO / CATATAN</>
IO29 Des 2025

How do I use Files.mismatch() to compare files?

In Java, java.nio.file.Files.mismatch(Path, Path) is a powerful method introduced in Java 12 that allows you to compare the contents of two files efficiently. It returns the position of the first byte where the two files differ, or -1L if they are identical. How to use Files.mismatch Here is a basic example of how to implement […]

Wayan · 2 menit baca
CONCURRENCY / CATATAN</>
Concurrency27 Des 2025

How do I debug concurrency issues effectively?

Debugging concurrency issues (like deadlocks, race conditions, and thread starvation) can feel like chasing ghosts because they are often non-deterministic. Here’s a strategy to tackle them effectively using both design patterns and tools available in your environment. 1. Give Your Threads Meaningful Names The default pool-1-thread-1 names are useless in a thread dump. By using […]

Wayan · 3 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.