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.

UTIL PACKAGE / CATATAN</>
Util Package29 Apr 2025

How do I avoid Optional as method parameter and why it matters?

Using Optional as a method parameter in Java is discouraged because it goes against the intended purpose of Optional and can lead to inefficiencies, poor readability, and unintended complications in the code. Here’s why it matters and how to avoid using Optional as a method parameter. Why Should You Avoid Optional as a Method Parameter? […]

Wayan · 4 menit baca
JSCH / CATATAN</>
JSch28 Apr 2025

How do I handle connection errors gracefully in JSch?

When using the JSch library for SSH connections in Java, it is essential to handle connection errors gracefully to ensure your application remains robust and can recover effectively from issues like authentication failures, host connectivity issues, or unexpected disconnections. Here’s a structured way to handle connection errors gracefully using JSch: Steps to Handle Errors Gracefully […]

Wayan · 4 menit baca
UTIL PACKAGE / CATATAN</>
Util Package28 Apr 2025

How do I integrate Optional with Java Streams?

Integrating Optional with Java Streams can simplify many common scenarios when working with potentially absent values. Here are different techniques depending on your specific use case: 1. Use Optional in Stream Pipelines When you have an Optional and you want to integrate it into a Stream pipeline, you can use stream() from Java 9 onward. […]

Wayan · 4 menit baca
BASIC / CATATAN</>
Basic28 Apr 2025

How to create cleaner code with type inference in Java 10

Type inference was introduced in Java 10 with the new var keyword, enabling developers to declare local variables without explicitly specifying their type. This feature can help create cleaner, more concise code by reducing boilerplate, though it should be used judiciously to maintain code readability. Here’s a guide on how to use type inference effectively […]

Wayan · 4 menit baca
UTIL PACKAGE / CATATAN</>
Util Package28 Apr 2025

How do I combine multiple Optionals in functional-style code?

Combining multiple Optional objects in Java in a functional style is a common need, especially when working with potentially nullable values without resorting to null checks. Here are examples of some approaches you can use based on the scenario: 1. Combining If All Optionals Are Present If you want to combine values only when all […]

Wayan · 4 menit baca
JSCH / CATATAN</>
JSch27 Apr 2025

How do I load a private key for SSH authentication using JSch?

To load a private key for SSH authentication using JSch (Java Secure Channel), you can use the addIdentity method available in the JSch class. This method allows you to specify the private key (and optionally, the public key or passphrase) used for key-based authentication. Here is an example of how to accomplish this: Example Code […]

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.