Skip to content

Instantly share code, notes, and snippets.

@s1monw1
Created September 2, 2022 21:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save s1monw1/d3f5b3a8350c8555c469c3dab49d8dc4 to your computer and use it in GitHub Desktop.
Save s1monw1/d3f5b3a8350c8555c469c3dab49d8dc4 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