Kotlin Cookbook: A Problem-Focused Approach

Front Cover
"O'Reilly Media, Inc.", Nov 14, 2019 - Computers - 254 pages

Use Kotlin to build Android apps, web applications, and more—while you learn the nuances of this popular language. With this unique cookbook, developers will learn how to apply thisJava-based language to their own projects. Both experienced programmers and those new to Kotlin will benefit from the practical recipes in this book.

Author Ken Kousen (Modern Java Recipes) shows you how to solve problems with Kotlin by concentrating on your own use cases rather than on basic syntax. You provide the contextand this book supplies the answers. Already big in Android development, Kotlin can be used anywhere Java is applied, as well as for iOS development, native applications, JavaScriptgeneration, and more. Jump in and build meaningful projects with Kotlin today.

  • Apply functional programming concepts, including lambdas, sequences, and concurrency
  • See how to use delegates, late initialization, and scope functions
  • Explore Java interoperability and access Java libraries using Kotlin
  • Add your own extension functions
  • Use helpful libraries such as JUnit 5
  • Get practical advice for working with specific frameworks, like Android and Spring
 

Contents

Chapter 1 Installing and Running Kotlin
1
Chapter 2 Basic Kotlin
21
Chapter 3 ObjectOriented Programming in Kotlin
47
Chapter 4 Functional Programming
73
Chapter 5 Collections
83
Chapter 6 Sequences
109
Chapter 7 Scope Functions
119
Chapter 8 Kotlin Delegates
127
Chapter 9 Testing
143
Chapter 10 InputOutput
159
Chapter 11 Miscellaneous
165
Chapter 12 The Spring Framework
191
Chapter 13 Coroutines and Structured Concurrency
201
Index
221
About the Author
233
Copyright

Other editions - View all

Common terms and phrases

About the author (2019)

Ken Kousen is a Java Champion and Oracle Developer Champion, and the author of the books Modern Java Recipes (O'Reilly), Gradle Recipes for Android (O’Reilly) and Making Java Groovy (Manning), as well as O’Reilly video courses in Android, Groovy, Gradle, Advanced Java, and Spring. He is a regular speaker on the No Fluff, Just Stuff conference tour and a JavaOne Rock Star and Grails Rock Star. He has spoken at conferences all over the world. Through his company, Kousen I.T., Inc., he has taught software development training courses to thousands of students.

Bibliographic information