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.

KOTLIN / CATATAN</>
Kotlin06 Mei 2025

How do I use default and named arguments in Kotlin functions?

In Kotlin, you can use default arguments and named arguments to simplify function calls and make your code more readable and flexible. Here’s how each of them works: Default Arguments Default arguments allow you to set a default value for a function parameter. If you don’t pass a value for that parameter when calling the […]

Wayan · 3 menit baca
KOTLIN / CATATAN</>
Kotlin06 Mei 2025

How do I define and call functions in Kotlin?

In Kotlin, defining and calling functions is straightforward and follows a clear syntax. Here’s how you can define and use functions: Defining a Function The fun keyword is used to define a function in Kotlin. Basic Syntax: fun functionName(parameters: ParameterType): ReturnType { // Function body return someValue // Optional if the return type is Unit […]

Wayan · 3 menit baca
KOTLIN / CATATAN</>
Kotlin06 Mei 2025

How do I loop through items using for and while in Kotlin?

In Kotlin, you can use both for and while loops to iterate through items. Here is a quick overview of how you can use these loops with examples: 1. Using a for Loop A for loop is used to iterate through a range, array, list, or any iterable. Iterating through a range: for (i in […]

Wayan · 2 menit baca
CONCURRENCY / CATATAN</>
Concurrency06 Mei 2025

How do I implement producer-consumer with LinkedBlockingQueue?

The LinkedBlockingQueue in Java is an implementation of the BlockingQueue interface, which is well-suited for implementing the Producer-Consumer problem. It manages a thread-safe queue where producers can add elements and consumers can take elements, with built-in thread synchronization. Here’s how you can implement a basic producer-consumer solution using LinkedBlockingQueue: Example: Producer-Consumer with LinkedBlockingQueue package org.kodejava.util.concurrent; […]

Wayan · 3 menit baca
SPRING CORE / CATATAN</>
Spring Core06 Mei 2025

How do I use @Component, @Autowired, and @Qualifier in Spring?

Spring provides annotations like @Component, @Autowired, and @Qualifier to simplify dependency injection and make applications loosely coupled and modular. Below, we’ll explore these annotations in detail, focusing on their usage and a complete example. 1. @Component Annotation The @Component annotation marks a class as a Spring-managed bean. It is auto-detected during component scanning, and Spring […]

Wayan · 5 menit baca
CONCURRENCY / CATATAN</>
Concurrency06 Mei 2025

How do I coordinate tasks with Phaser in Java concurrency?

Coordinating tasks with Phaser in Java concurrency involves leveraging its powerful synchronization mechanism, especially designed for dynamic scenarios where the number of threads (or parties) may change during execution. The Phaser class found in the java.util.concurrent package provides a flexible and reusable barrier, similar to CyclicBarrier or CountDownLatch, but with added versatility. Key Features of […]

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