kotlin

Generics in Kotlin

Generics in Kotlin world
2020-08-14
3 min read

Top 10 Kotlin Questions in StackOverflow

IntArray vs. Array<Int> In java code IntArray: int[] Array<Int>: Integer[] Create method: IntArray: val intArray : IntArray = intArrayOf(1, 2, 3, 4, 5) Array<Int>: val arrayOfInts : Array<Int> = arrayOf(1, 2, 3, 4, 5) Iterable vs. Sequence Usage Iterable: getPeople() .filter { it.age >= 18 } .map { it.name } .take(5) Sequence: start with asSequence() and end with toList() or toSet()… getPeople().
2020-06-19
4 min read