Android Application Development All-in-One For Dummies, 3rd Edition
by Barry Burd, John Paul Mueller
Chapter 3
Kotlin for Everyone
IN THIS CHAPTER
How computers, phones, and other devices run Kotlin programs
The parts of a typical Kotlin program
You might have noticed in Chapter 2 of this minibook that Kotlin starts with a Java base but ends up doing a lot more. In fact, it borrows features from Groovy, Scala, C#, and Python as well. Kotlin and Java have many similarities, and you can still write code in Java-style, with limits. However, to realize the full potential of Kotlin, you really need to stick to Kotlin-specific methodologies, which is something that Chapter 2 brings up. Still, there is the question of just how Kotlin and Java compare when it comes to developing and executing applications, which is part of what this chapter will tell you.
Although this chapter focuses on Android development issues, you have quite a bit more to discover with Kotlin. For example, you aren’t limited to interacting with just Java. You can also interact with other language files, such as native code C/C++ files (see https://developer.android.com/studio/projects/add-native-code for details). You can also compile your code in several ways, such as by creating JavaScript output (see https://kotlinlang.org/docs/tutorials/javascript/kotlin-to-javascript/kotlin-to-javascript.html for details). ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access