Hey, I saw you were talking about the ‘?.’
Maroš Šeleng
1

The ‘?.’ is called the ‘safe call’ operator. It will perform a null check for you and proceeds down the chain as long as what is before the ? is not null. The Elvis operator is more like a ternary operator. For example, a ?: b, is logically equivalent to (a != null) ? a : b.

Adam McNeilly is correct. I totally forgot that I could do TIMER_DELAY: Long = 3000 at the time. The point I was trying to make in the article was that I was surprised that my longs in Java were converted to ints. Thinking that was type safety was a mistake on my part.

Like what you read? Give Benjamin Baxter a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.