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</>
Kotlin26 Jun 2026

How do I use the Elvis operator to provide default values in Kotlin?

In Kotlin, the Elvis operator ?: provides a fallback value when the expression on its left is null. val result = nullableValue ?: defaultValue If nullableValue is not null, result gets that value. If nullableValue is null, result gets defaultValue. Example: val name: String? = null val displayName = name ?: "Guest" println(displayName) // Guest […]

Wayan · 1 menit baca
KOTLIN / CATATAN</>
Kotlin26 Jun 2026

How do I use the safe call operator `?.` in Kotlin?

In Kotlin, the safe call operator ?. lets you access a property or call a function only if the value is not null. If the value is null, the expression simply returns null instead of throwing a NullPointerException. val name: String? = null val length = name?.length println(length) // null Here, name is nullable because […]

Wayan · 2 menit baca
KOTLIN / CATATAN</>
Kotlin26 Jun 2026

How do I declare nullable variables using `?` in Kotlin?

In Kotlin, you declare a nullable variable by adding ? after the type. var name: String? = null This means name can hold either a String value or null. Examples: var age: Int? = null age = 25 val email: String? = "user@example.com" val phone: String? = null Without ?, Kotlin does not allow null: […]

Wayan · 1 menit baca
KOTLIN / CATATAN</>
Kotlin26 Jun 2026

How do I handle null values safely in Kotlin?

Kotlin handles null safety through its type system: a normal type like String cannot be null, while a nullable type like String? can be null. 1. Use nullable types when a value may be null val name: String = "Alice" // Cannot be null val nickname: String? = null // Can be null If a […]

Wayan · 3 menit baca
KOTLIN / CATATAN</>
Kotlin25 Jun 2026

How do I use inline functions and reified types in collection processing?

In Kotlin, inline functions and reified type parameters are especially useful in collection processing when you want to write generic, type-safe utilities that still need access to the actual runtime type. Normally, generic type information is erased at runtime, but reified type parameters in inline functions let you do checks like is T, as T, […]

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