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.

CONCURRENCY / CATATAN</>
Concurrency05 Mei 2025

How do I control access to resources using Semaphore?

To control access to shared resources in a multithreaded environment, a Semaphore is frequently used, which is part of the java.util.concurrent package. A semaphore manages a set number of permits that control how many threads can access a shared resource simultaneously. Threads acquire permits before accessing the resource and release the permits after they are […]

Wayan · 4 menit baca
JSCH / CATATAN</>
JSch04 Mei 2025

How do I configure key-based authentication with a passphrase using JSch?

When using JSch (Java Secure Channel) for SSH key-based authentication with a passphrase, you need to set your private key file (which is protected by the passphrase) and optionally the passphrase itself. Below is an example demonstrating how to configure key-based authentication using JSch: Code Example package org.kodejava.jsch; import com.jcraft.jsch.*; public class JSchKeyBasedAuthentication { public […]

Wayan · 3 menit baca
CONCURRENCY / CATATAN</>
Concurrency04 Mei 2025

How do I avoid thread safety issues using concurrent collections?

When working with concurrent collections in Java, thread safety issues can be minimized or completely avoided by using the right tools and patterns provided by the Java concurrency library. Here are some guidelines for avoiding thread safety issues using concurrent collections: 1. Use Concurrent Collections Java provides a range of thread-safe collections in the java.util.concurrent […]

Wayan · 4 menit baca
SPRING CORE / CATATAN</>
Spring Core04 Mei 2025

How do I create my first Spring bean using XML configuration?

Creating your first Spring bean using XML configuration is a straightforward process. Here’s a step-by-step guide: 1. Add Spring Framework to Your Project Make sure you have Spring dependencies added to your project. If you’re using Maven, include the following dependencies in your pom.xml: <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context</artifactId> <version>6.2.6</version> <!– Update to a stable version –> […]

Wayan · 3 menit baca
JAVA 10 / CATATAN</>
Java 1004 Mei 2025

How do I use new Java 10 methods like List.copyOf(), Set.copyOf(), and Map.copyOf()?

Java 10 introduced the List.copyOf(), Set.copyOf(), and Map.copyOf() methods as convenient ways to create unmodifiable copies of existing collections. These methods are part of the java.util package and provide a simpler way to create immutable collections compared to using older methods like Collections.unmodifiableList(). Here’s how you can use them: 1. List.copyOf() The List.copyOf() method creates […]

Wayan · 3 menit baca
CONCURRENCY / CATATAN</>
Concurrency04 Mei 2025

How do I use CountDownLatch to wait for other threads to finish?

In Java, the CountDownLatch is a synchronization aid that allows one or more threads to wait until a set of operations being performed in other threads is complete. It is part of the java.util.concurrent package. How It Works A CountDownLatch is initialized with a given count. Each time one of the threads completes its task, […]

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.