gerlava.blogg.se

Learning kotlin from java
Learning kotlin from java










Operations on lists, sets, queues, and deques In Kotlin, there are many operations on collections that look exactly the same as their counterparts in Java. Operations that are the same in Java and Kotlin The second part of the guide, starting from Mutability, explains some of the differences by looking at specific cases.įor an introduction to collections, see the Collections overview or watch this video by Sebastian Aigner, Kotlin Developer Advocate.Īll of the examples below use Java and Kotlin standard library APIs only. It is divided into operations that are the same and operations that exist only in Kotlin.

learning kotlin from java

The first part of this guide contains a quick glossary of operations on the same collections in Java and Kotlin. It will help you migrate from Java to Kotlin and write your code in the authentically Kotlin way. This guide explains and compares collection concepts and operations in Java and Kotlin. Collections are groups of a variable number of items (possibly zero) that are significant to the problem being solved and are commonly operated on.












Learning kotlin from java