Aktuelle Kommentare

Tyler Durden
I think this is a perfect addition to my music and coffee while I wait …

Anonymous
You have issues, get help if you cannot fix it yourself.

L3X4S-hikingpro33
This was a truly captivating read.

― George Bernard Shaw
Awesome quote thanks

Maya Angelou
Most Fantastic quote Ever?

Mehr

kalmyk's Zitate

Alle Zitate

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.