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.

NET PACKAGE / CATATAN</>
Net Package09 Jan 2026

How do I use InetAddress to resolve hostnames?

To resolve a hostname to an IP address (or vice versa) in Java, you use the java.net.InetAddress class. This class provides static factory methods to perform DNS lookups. Here are the most common ways to use it: 1. Resolve a Hostname to an IP Address Use InetAddress.getByName(String host) to get the primary IP address associated […]

Wayan · 2 menit baca
NET PACKAGE / CATATAN</>
Net Package08 Jan 2026

How do I implement a simple TCP client and server?

To implement a simple TCP client and server in Java, you use the ServerSocket class for the server and the Socket class for the client. Here is a straightforward example of both, where they exchange simple text messages. 1. The TCP Server The server listens on a specific port and waits for a client to […]

Wayan · 3 menit baca
NET PACKAGE / CATATAN</>
Net Package08 Jan 2026

How do I use java.net.URI with Builder API?

Actually, the standard java.net.URI class in the JDK does not have a built-in Builder API. It only provides constructors and the URI.create(String) factory method. To build URIs using a builder pattern in Java, you have three common options: 1. Using URI Constructors (Standard JDK) While not a “builder,” the multi-argument constructor is the safest way […]

Wayan · 2 menit baca
HTTPCLIENT / CATATAN</>
HttpClient07 Jan 2026

How do I fetch JSON using java.net.http.HttpRequest?

To fetch JSON using the Java HTTP Client (java.net.http), you typically send a GET request and process the response body as a String. Since the standard library doesn’t include a JSON parser, you’ll receive the raw JSON string, which you can then parse using a library like Jackson or Gson. Here is a clean example […]

Wayan · 2 menit baca
HTTPCLIENT / CATATAN</>
HttpClient07 Jan 2026

How do I use WebSocket with HttpClient?

To use WebSockets with the Java native HttpClient (introduced in Java 11 and fully supported in Java 25), you use the WebSocket.Builder. The process involves three main steps: 1. Create an HttpClient (or use an existing one). 2. Implement a WebSocket.Listener to handle incoming messages and events. 3. Build and open the connection using HttpClient.newWebSocketBuilder(). […]

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.