This is a quick guide to Kotlin programming language. The previous part of this guide is here
#Object Oriented
fun main(args : Array<String>) {
class local (val x : Int)
val y = local(10)
println("${y.x}")
This is a quick guide to Kotlin programming language. The previous part of this guide is here
#Object Oriented
fun main(args : Array<String>) {
class local (val x : Int)
val y = local(10)
println("${y.x}")
#Intro
Kotlin is a new programming language for the JVM. It produces Java bytecode, supports Android and generates JavaScript. The latest version of the language is Kotlin M5.3
Kotlin project website is at kotlin.jetbrains.org.
All the codes here can be copied and run on Kotlin online editor.
Let's get started.
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
task checkstyle(type: Checkstyle) { | |
configFile rootProject.file('checkstyle.xml') | |
configFile file("${project.rootDir}/code_quality_tools/checkstyle.xml") | |
ignoreFailures true // Uncomment to fail where warnings > 0 | |
showViolations true | |
source 'src' | |
include '**/*.java'' |
import android.os.Bundle | |
import androidx.appcompat.app.AppCompatActivity | |
import androidx.lifecycle.Observer | |
import kotlinx.android.synthetic.main.activity_main.* | |
import org.koin.androidx.viewmodel.ext.android.viewModel | |
class MainActivity : AppCompatActivity() { | |
private val viewModel: MainVM by viewModel() |