Skip to content

Instantly share code, notes, and snippets.

@s1monw1
Created October 27, 2017 21:31
Show Gist options
  • Save s1monw1/4c22ba9e5997df92683186ef445c1cb7 to your computer and use it in GitHub Desktop.
Save s1monw1/4c22ba9e5997df92683186ef445c1cb7 to your computer and use it in GitHub Desktop.
fun test(a: Int, printToConsole: Boolean = true) {
if (printToConsole) println("int a: " + a)
}
fun testWithoutPrint(a: Int) = test(a, false)
fun main(args: Array) {
testWithoutPrint(2)
test(2)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment