You are on page 1of 32

Intro to Kotlin

Pengembangan Aplikasi Mobile


Kotlin: Basic Syntax
Program Entry Point

fun main(args:Array<String>){
println("Hello, world");
}
Program Entry Point
Function
~
•~
Function
~
•~
Function
~
•~
variables
~
•~
variables
~
•~
variables
~
•~
Comments
~
•~
String Templates
~
•~
Conditional Expression
~
•~
Conditional Expression
~
•~
Nullable values and null checks
~
•~
Nullable values and null checks
~
•~
Nullable values and null checks
~
•~
Type checks and automatic casts
~
•~
Type checks and automatic casts
~
•~
Type checks and automatic casts
~
•~
Loop: for
~
•~
Loop: While
~
•~
When Expression
~
•~
Ranges
~
•~
Ranges
~
•~
Ranges
~
•~
Ranges
~
•~
Collections
~
•~
Collections
~
•~
Collections
~
•~
Creating basic classes and their instances
~
•~
Referensi
1)https://kotlinlang.org/docs/reference/basic-syntax.html#using-nullable-values-a
nd-checking-for-null
2)Kotlin Programming: The Big Nerd Ranch Guide, Josh Skeen and David
Greenhalgh

You might also like