kotlin

Kotlin collections and mutability
Privacy Policy

Kotlin Mutable and Immutable Collections

In this article I would like to emphasise over a few options that we have when working with data structure and more precisely with collections in a mutable and immutable fashion. So let’s start with a few of them and see their mutability state. But first, what makes a list mutable or immutable? Immutable Collections […]

, , , ,
Privacy Policy

Kotlin – for, while, if, when

Control flow: for, while, if, when This post is for beginners who want to start learning Kotlin language and already know Java. We will show simple examples of for, while, if, when in both languages, in parallel, for an easier understanding. We will use Log.e in order to print string messages, as from our point of view,

, , , , , , , , , , ,
Articles

Kotlin – How to pass a function as parameter

Recently, I’ve noticed that there are a few different ways to pass a function as parameter in Kotlin. In this post I will use 2 functions: sum and divide. We have to declare the sum function, in such way that it can receive the divide function as argument. The most common and often more convenient

, , , , , ,
Privacy Policy

Functions in Kotlin

In this post I will talk about 5 cool things that functions can do in Kotlin, better than methods in Java.   1. Forget about overloaded methods In Java, when you need the same method to have 1 parameter in one case and more parameters in another case, you would have to overload the method.

, , , , , ,
Privacy Policy

Kotlin – Hello world

Introduction What is Kotlin? It is a new programming language built by JetBrains, and as you may already know, Google announced at Google I/O 2017, that they will now officially support this language. It is inspired by existing languages such as Java, C#, JavaScript, Scala and Groovy. What are the advantages of using Kotlin? it’s

,
Scroll to Top