Chapter 4

Kotlin

IN THIS CHAPTER

Bullet Understanding the structure of Kotlin programs

Bullet Making comments

Bullet Declaring variables and constants

Bullet Using mathematical operators

Bullet Working with branching and looping statements

Bullet Creating functions, data structures, and objects

When the world of mobile computing (smartphones and tablets) swept over the world, programmers wanted to create apps for these new devices. When the iPhone redefined the smartphone market, Google quickly released a similar operating system called Android.

Initially, Google endorsed Java as the favored language for creating Android apps. However, after various lawsuits involving Oracle (the owner of Java), Google looked for other ways to create Android apps. That’s when a company called JetBrains developed Kotlin (https://kotlinlang.org), a language similar to Java. Now Google has officially endorsed Kotlin as the preferred language ...

Get Beginning Programming All-in-One For Dummies, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.