TheBulgarianWolf

Kotlin Example

Jan 13th, 2021
961
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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.  
RAW Paste Data