Learn Kotlin – Class

Although Kotlin is statically typed language, it supports object-oriented programming like Java. Before explaining further let us dive into the basic syntax of the Kotlin class.

class Vehicle { // class definition
	// class body
}

So, defining a basic class is as simple as this and similar to Java.

Before diving further into the class syntax let us first discuss about the four access modifier available in Kotlin.

Continue reading Learn Kotlin – Class