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.

KOTLIN / NOTES</>↗
Kotlin21 Jun 2026

How do I use object expressions and object declarations in Kotlin?

Object expressions vs. object declarations in Kotlin Kotlin has two closely related features: Object expressions: create an anonymous object immediately. Object declarations: create a named singleton object. They both use the object keyword, but they are used for different purposes. 1. Object expressions Use an object expression when you need a one-off object, often to […]

Wayan · 4 min read
KOTLIN / NOTES</>↗
Kotlin21 Jun 2026

How do I create and use companion objects for static-like behavior in Kotlin?

In Kotlin, a companion object is an object declared inside a class that can hold members callable on the class itself, giving you static-like behavior. Kotlin does not have Java-style static members directly. Instead, you usually use companion object. Basic example class User(val name: String) { companion object { const val DEFAULT_NAME = "Guest" fun […]

Wayan · 3 min read
KOTLIN / NOTES</>↗
Kotlin21 Jun 2026

How do I use inner and nested classes in Kotlin?

In Kotlin, classes can be declared inside other classes in two main ways: Nested classes — default behavior Inner classes — declared with the inner keyword Nested classes A class declared inside another class is nested by default. class Outer { class Nested { fun message(): String { return "Hello from Nested" } } } […]

Wayan · 3 min read
KOTLIN / NOTES</>↗
Kotlin21 Jun 2026

How do I use abstract classes and methods in Kotlin?

In Kotlin, an abstract class is a class that cannot be instantiated directly. It is meant to be subclassed. An abstract method is a method declared without an implementation. Subclasses must override it. Basic example abstract class Animal { abstract fun makeSound() fun sleep() { println("Sleeping…") } } class Dog : Animal() { override fun […]

Wayan · 3 min read
KOTLIN / NOTES</>↗
Kotlin21 Jun 2026

How do I use visibility modifiers (private, internal, protected, public) in Kotlin classes?

In Kotlin, visibility modifiers control where classes, properties, functions, and constructors can be accessed from. The main visibility modifiers are: public private protected internal If you do not specify a visibility modifier, Kotlin uses public by default. 1. public public means the declaration can be accessed from anywhere. class User { public val name: String […]

Wayan · 5 min read
KOTLIN / NOTES</>↗
Kotlin21 Jun 2026

How do I implement interfaces and use multiple inheritance in Kotlin?

In Kotlin, interfaces define a contract that classes can implement. Kotlin supports multiple inheritance of interfaces, but not multiple inheritance of classes. 1. Defining an interface An interface can declare: abstract properties abstract functions functions with default implementations interface Drivable { val maxSpeed: Int fun drive() fun stop() { println("Stopping the vehicle") } } Here: […]

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