SupportWriter space ↗
REFERENCE LIBRARY

References from other publishers

Republished articles with source attribution. This collection is separate from Diary Coding’s original guides and does not display ads.

Read original guides → · Editorial policy

FOR YOUR CURIOSITY

Latest notes.

HTTPCLIENT / NOTES</>↗
HttpClient16 May 2025

How do I build an HttpRequest with query parameters?

In Java 11, you can use the HttpRequest class (from the java.net.http package) to build HTTP requests, including adding query parameters to a URI. Here’s how you can build an HttpRequest with query parameters: Example package org.kodejava.net.http; import java.net.URI; import java.net.URISyntaxException; import java.net.http.HttpClient; import java.net.http.HttpRequest; import java.net.http.HttpResponse; import java.net.http.HttpHeaders; import java.net.URLEncoder; import jav...

Wayan · 3 min read
HTTPCLIENT / NOTES</>↗
HttpClient15 May 2025

How do I use HttpClient to call REST APIs?

Java 11 introduced a new HttpClient API (java.net.HttpClient) that simplifies making HTTP requests and handling responses. It provides a clean and concise way to perform synchronous and asynchronous HTTP operations, and it fully supports RESTful APIs. Here’s a step-by-step guide with examples for how to use the Java 11 HttpClient to call REST APIs. 1. […]

Wayan · 4 min read
HTTPCLIENT / NOTES</>↗
HttpClient15 May 2025

How do I send requests using different HTTP Methods with HttpClient?

Java 11 introduced the HttpClient API to simplify and modernize HTTP communications. This API supports sending requests using different HTTP methods (GET, POST, PUT, DELETE, etc.). Below is an explanation and example of how to perform these operations. 1. Setup You will use the HttpClient and related classes from java.net.http package: HttpClient – To execute […]

Wayan · 4 min read
CONCURRENCY / NOTES</>↗
Concurrency14 May 2025

How do I write custom synchronizers using AbstractQueuedSynchronizer?

Writing custom synchronizers with AbstractQueuedSynchronizer (AQS) in Java involves creating classes that encapsulate synchronization logic, such as locks, semaphores, or barriers. AQS simplifies the development of concurrency tools by handling queueing and thread state management. Below are the key steps and guidelines to write custom synchronizers using AbstractQueuedSynchronizer: 1. Understand AQS Concepts state: AQS maintains […]

Wayan · 4 min read
CONCURRENCY / NOTES</>↗
Concurrency14 May 2025

How do I implement async pipelines with CompletableFuture chaining?

Asynchronous pipelines can be implemented efficiently in Java using CompletableFuture. The ability of CompletableFuture to chain multiple steps through its functional programming model (e.g., thenApply, thenCompose, thenAccept, etc.) makes it a powerful tool for building non-blocking pipelines. Here’s a step-by-step guide to implement async pipelines using CompletableFuture chaining: 1. Basics of CompletableFuture CompletableFuture is a […]

Wayan · 4 min read
CONCURRENCY / NOTES</>↗
Concurrency13 May 2025

How do I use CompletableFuture for reactive-style concurrency?

Using CompletableFuture in Java can be a powerful way to implement reactive-style concurrency. It provides a clean and functional way to perform asynchronous tasks, compose their results, and handle exceptions without blocking threads. Here’s an explanation with examples to guide you through its reactive-style usage: Key Features of CompletableFuture Asynchronous execution – Run tasks on […]

Wayan · 5 min read
✳

Knowledge grows when shared.

Stay curious. There is always something new to learn.

Explore notes ↗
Putu Adi Guna Permana
ABOUT THE AUTHOR

Dr (C). Ir. Putu Adi Guna Permana, S.Kom., M.Kom., IPM., ASEAN Eng.

Writer and founder of Diary Coding — sharing notes, tutorials, and experiences about programming for anyone who wants to keep learning.