What does += mean in Kotlin?

The strange += operator in Kotlin introduce an immutable structure of the class for the plus operator which means any class outside the class can’t edit its internal data . introduce a mutable structure of the class for the plusAssign operator which means its internal data can be edited anywhere.

Sizin İçin Seçtik  Why does low frequency travel further?

Leave a Reply

Your email address will not be published. Required fields are marked *

What does ?: Mean in Kotlin?

length ?: -1. If the expression to the left of ?: is not null , the Elvis operator returns it, otherwise it returns the expression to the right . Note that the expression on the right-hand side is evaluated only if the left-hand side is null .

Sizin İçin Seçtik  What can you build with Kotlin?

Leave a Reply

Your email address will not be published. Required fields are marked *