Nylige kommentarer

Someone you will never meet
I'm just procrastinating on my essay that is due in 2 days qwq

Myself
uhhh what

J.K. Rowling
TabCrack is a website offering all premium software for free, without requiring any payment. Users …

Wikipedia
Dude as I was typing this quote I was changing my posture and carpal tunnel …

Made Up On The Spot
Riddled with errors.

Mer

kalmyk's sitater

Alle sitater

Dmitry Jemerov
Do you remember how children memorize the colors of the rainbow? "Richard Of York Gave Battle In Vain!" Imagine you need a function that gives you a mnemonic for each color (and you don't want to store this information in the enum itself). In Java you can use a switch statement for this. The corresponding Kotlin construct will be when. Like if, when is an expression that returns a value, so you can write a function with an expression body, returning the when expression directly.