A complete guide on Java to Kotlin

Gaurav
MindOrks
Published in
3 min readOct 18, 2019

Learning Simplified

I asked a Java developer why he has not tried Kotlin, there are not good resources for Java-to-Kotlin, he answered and this series was born

Our motto from this series is to reduce the friction for java developers to adapt Kotlin. You will not become an expert in Kotlin but definitely you will start appreciating it. At the very least, you will become familiar with the concept and make an informed decision whether to use it or not. This series is strictly for Java Developers. All the examples and explanation assumes you know Java OR OOPS.

Disclaimer : Wherever possible, We will have Java code and similar Kotlin code. I care for you

This series is divided into few parts. The logic behind the sequence chosen: Earlier parts show the minimal difference between Kotlin and Java so you can grasp the concept easily and feel confident. The parts at the end show more capabilities and offerings of Kotlin which are either not present in Java OR they are slightly different as a concept.

Some points to note:

👉 Whatever you do in Kotlin can also be done in Java
👉 From language basics perspective, Kotlin is syntatical sugar over Java. I say Java is compiled, Kotlin is smartly compiled.
👉 There are some cases where Kotlin is more efficient (the new offerings from Kotlin Platform Classes, we will see later)
👉 All the parts of this series are connected, it is better to read in the sequence. Bookmark it now.

This series was originally written here on my website and this article contains the index and the links, Click here to visit

Index

Part 1

What and Why Kotlin? Are not you happy with Java? Java is a mature language then why do we even…[Read Here]

Part 2

All about Basics. From Semicolon to Inheritence, From Class to Variables. From Visibility modifiers to method parameters. From constructor to Constant …[Read Here]

Topics in Part 2: Semicolon, File & Package, Access Modifier, Equals ==, String Concatination, Variable, New Instance, Class Definition, Inheritance

Part 3

Smart Kotlin shows its magic and help you type less and focus more on the problem statement you are working on …[Read Here]

Topics in Part 3: Explicit Cast , Instance Of, Smart Cast, Ternary, Functions, Top Level members, Multi Line String

Part 4

By this time you should be convinced from the power of Kotlin, This part is dedicated to constructors and inheritance with …[Read Here]

Topics in part 4: Constructors, Inheritance & constructor

Part 5

It gets interesting with every part. This part focuses on a very important feature of Kotlin: Null Reference and …[Read Here]

Topics in part 5: Null Reference, Elvis ?:, Let, Safe Cast

Part 6

Consider this part a break in this series. After 2–3 difficult parts, I thought to take a step back and explain the small but powerful and easy to understand …[Read Here]

Topics in part 6: If Expression, When Expression, Range, Range with Step, For In Loop, Labelled Block

Part 7

This part is all about Kotlin new offerings and how powerfull small things can be. It will amaze you and confuse you …[Read Here]

Topics in part 7: Extension Function, Data Class, Constant, Singleton, Anonymous, Companion

Part 8

Let’s deep dive into true kotlin offerings in the area of Lambda and the scoped functions. You will see these everywhere you …[Read Here]

Topics in part 8: Lambda Expression & Scoped Functions

Part 9

More utilities and better syntax from Kotlin will impress you and help you to focus more on …[Read Here]

Topics in part 9: Collection Utilities, Generics, Annotations

Part 10

Some amazing and mind-boggling offerings from Kotlin, it will take some time to sink in …[Read Here]

Topics in part 10: Late Init, Delegator, Lazy, Coroutine

Note: This series was originally written here on my website and this article contains the index and the links, Click here to visit

I hope you will learn something from this series. If you happen to like the series, kindly share it among your circle. Upvote is appreciated.

cheers!

--

--

Gaurav
MindOrks

Tech Enthusiast, Trainer & Wannapreneur, gaurav-khanna.in ( Want to happy, healthy and productive? GoodApp https://share.goodapp.in/gaurav)