kotlin

Range and Iteration

Reading Time: 3 minutes In this blog, we are going to learn about ranges and iteration in kotlin. Imagine telling someone to count from one to five by uttering “set i equal to 1 but while keeping i less than 6, increment i and report the value.” If we had to communicate with a fellow human that way, it would have ended civilization a long time ago. Yet that’s Continue Reading

Kotlin : Lambdas and Higher-Order Functions

Reading Time: 3 minutes High order function (Higher level function) is a function which accepts function as a parameter, returns a function and it can do both. We can pass a function instead of passing Int, String, or other data types as a parameter in a function. Lambdas Expressions Lambdas Expressions are essentially anonymous functions that we can treat as values , for example -pass lambda expressions as arguments to Continue Reading

Getting Started with Kotlin

Reading Time: 2 minutes Introduction: In this blog, I am going to discuss the basics of the kotlin programming language. Kotlin is a statically, typically programmed programming language developed by JetBrains. It produces world-class IDEs like IntelliJ IDEA, PhpStorm, Appcode, etc. However, It was first introduced by JetBrains in 2011 with the new JVM language. It is an object-oriented language and a “better language” than Java. This language is Continue Reading

String Templates and Multiline Strings in Kotlin

Reading Time: 3 minutes String Templates In programs, we often create strings with embedded values of expressions. Concatenating values to create strings using the + operator makes the code verbose and hard to maintain. String templates solve that problem by providing an elegant solution. Within a double-quoted string, the $ symbol can prefix any variable to turn that into an expression. If the expression is more complex than a Continue Reading

How to create a Singleton class in Kotlin

Reading Time: 3 minutes What is Singleton Class? First of all, let us discuss what is singleton class is. We can define a singleton class in such a way that only one instance of the class can create and we can use that instance everywhere. We can use a singleton class where we need only one instance of the class like NetworkService, DatabaseService, etc. Generally, it is done because Continue Reading

Kotlin : Use of Collections

Reading Time: 3 minutes Collections The Kotlin Standard Library provides a comprehensive set of tools for managing collections – groups of a variable number of items that are significant to the problem being solved and are commonly operated on. Collections are a common concept for most programming languages, usually containing a number of objects (elements,items) of the same type. The following collection types are relevant for Kotlin: List is an ordered collection Continue Reading

Important Difference : Kotlin vs Java

Reading Time: 4 minutes Kotlin vs Java Kotlin is a statically typed language developed by JetBrains similar to Java, Most of the developers starts using Kotlin for developing Android Applications. This is evident from the fact that Android Studio comes with inbuilt support for Kotlin like it has for Java. The Question arises that we should switch to Kotlin?– Before making any choice we should understand the distinction between Continue Reading

Basics of Kotlin

Reading Time: 2 minutes Hello everyone today I will discuss the basics of kotlin for example Hello world program, variables, functions, if and when, functions. So let’s do some practice and also important some theory. Hello World package intro fun main() { // from kotlin 1.3 program arguments are optional val name = “kotlin” // val for final variable println(“Hello, $name!!!!”) } Things to be noticed if we compare Continue Reading

Developers Needs SDKMAN Not Super-Man

Reading Time: 4 minutes Every developer has pain for setup development environment to his/her machine with lots of the setups. Sometimes, the pain goes beyond while we need to test same application on multiple versions of SDKs or virtual machines. If you are a Mac user, you have the best option called brew installer. But if you are Linux user, your pain is unpredictable. We are JVM stack developers Continue Reading