TheBulgarianWolf

Kotlin Example

Jan 13th, 2021
1,096
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Kotlin 0.36 KB | None | 0 0
  1. fun sayHello(greeting: String,itemToGreet:String) = println("$greeting $itemToGreet")
  2.  
  3. fun main(args: Array<String>) {
  4.     val interestingThings = mutableListOf("Kotlin","Programming")
  5.     interestingThings.add("Dogs")
  6.     sayHello("Hi","brother!")
  7.     val map = mutableMapOf(1 to "a", 2 to "b", 3 to "c")
  8.     map.forEach{key,value -> println("$key -> $value")}
  9. }
  10.  
Add Comment
Please, Sign In to add comment