Expert guidance and amazing examples from Kotlin core developers! It’s everything you need to get up and running fast.
Kotlin in Action, Second Edition takes you from language basics to building production-quality applications that take advantage of Kotlin’s unique features. Discover how the language handles everything from statements and functions to classes and types, and the unique features that make Kotlin programming so seamless.
In Kotlin in Action, Second Edition you will learn:
Kotlin statements and functions, and classes and typesFunctional programming on the JVMThe Kotlin standard library and out-of-the-box featuresWriting clean and idiomatic codeCombining Kotlin and JavaImprove code reliability with null safetyDomain-specific languagesKotlin coroutines and flowsMastering the kotlinx.coroutines library
Kotlin in Action, Second Edition is a complete guide to the Kotlin language written especially for readers familiar with Java or another OO language. Its authors—all core Kotlin language developers and Kotlin team members—share their unique insights, along with practical techniques and hands-on examples. This new second edition is fully updated to include the latest innovations, and it adds new chapters dedicated to coroutines, flows, and concurrency.
Purchase of the print book includes a free eBook in PDF and ePub formats from Manning Publications.
About the technology
Kotlin is a low-hassle, high-productivity programming language flexible enough to handle any web, mobile, cloud, and enterprise application. Java developers will appreciate the simple syntax, intuitive type system, excellent tooling, and support for functional-style programming. Plus, since Kotlin runs on the JVM, it integrates seamlessly with existing Java code, libraries, and frameworks, including Spring and Android.
About the book
Kotlin in Action, Second Edition teaches you Kotlin techniques you can use for almost any type of application, from enterprise services to Android apps. The authors are all members of the Kotlin team, so you can trust that even the gnarly details are dead accurate. You’ll start with Kotlin fundamentals, learning how the language handles everything from statements and functions to classes and types, and about its unique features that make Kotlin programming so seamless.
As you progress through this masterful book, you’ll get hands-on with the Kotlin standard library, functional programming in Kotlin, and advanced features such as generics and reflection. And this updated second edition now covers coroutines and structured concurrency to help you create efficient high-performance applications.
What’s inside
Guidance from members of the Kotlin teamDomain-specific languagesKotlin coroutines and flows
About the reader
For readers familiar with Java or another OO language.
About the author
Sebastian Aigner is a Developer Advocate at JetBrains, and host of the Talking Kotlin podcast. Roman Elizarov was the lead designer of the Kotlin language. JetBrains Developer Advocate, Svetlana Isakova, was a member of the Kotlin compiler team. Dmitry Jemerov is one of Kotlin’s initial developers.
Table of Contents
PART 1
1 Kotlin: What and why
2 Kotlin basics
3 Defining and calling functions
4 Classes, objects, and interfaces
5 Programming with lambdas
6 Working with collections and sequences
7 Working with nullable values
8 Basic types, collections, and arrays
PART 2
9 Operator overloading and other conventions
10 Higher-order functions: Lambdas as parameters and return values
11 Generics
12 Annotations and reflection
13 DSL construction
PART 3
14 Coroutines
15 Structured concurrency
16 Flows
17 Flow operators
18 Error handling and testing
APPENDIXES
A Building Kotlin projects
B Documenting Kotlin code
C The Kotlin ecosystem
From the Publisher





Publisher : Manning
Publication date : May 21, 2024
Edition : 2nd ed.
Language : English
Print length : 560 pages
ISBN-10 : 161729960X
ISBN-13 : 978-1617299605
Item Weight : 2.05 pounds
Dimensions : 7.38 x 1.2 x 9.25 inches
Best Sellers Rank: #238,830 in Books (See Top 100 in Books) #25 in Software Design & Engineering #47 in Object-Oriented Design #139 in Software Development (Books)
Customer Reviews: 4.7 4.7 out of 5 stars (45) var dpAcrHasRegisteredArcLinkClickAction; P.when(‘A’, ‘ready’).execute(function(A) { if (dpAcrHasRegisteredArcLinkClickAction !== true) { dpAcrHasRegisteredArcLinkClickAction = true; A.declarative( ‘acrLink-click-metrics’, ‘click’, { “allowLinkDefault”: true }, function (event) { if (window.ue) { ue.count(“acrLinkClickCount”, (ue.count(“acrLinkClickCount”) || 0) + 1); } } ); } }); P.when(‘A’, ‘cf’).execute(function(A) { A.declarative(‘acrStarsLink-click-metrics’, ‘click’, { “allowLinkDefault” : true }, function(event){ if(window.ue) { ue.count(“acrStarsLinkWithPopoverClickCount”, (ue.count(“acrStarsLinkWithPopoverClickCount”) || 0) + 1); } }); });
9 reviews for Kotlin in Action, Second Edition
Add a review
Original price was: $59.99.$46.43Current price is: $46.43.


Ryan B –
Excellent choice for understanding Kotlin coroutines and concurrency especially
I came to this book with 20+ years software engineering experience, most recently heavy on Python and asyncio. I had to implement an Android app which makes judicious use of coroutines, and I first heard of one of the authors, Roman Elizarov from a few of his youtube videos on coroutines in Kotlin.The videos are an excellent explanation of how they work and the design choices and theory that went into them. This book is equally good. What I particularly like are the examples – they not only show you the right way to do things, but give several counter-examples of the less-than-right way, and explain the shortcomings.Explanations are just right – they pack in all the right information to explain each concept, but with nothing unnecessary.
Liam Bohl –
Excellent
This is not an introduction to programming. It’s aimed at Java developers or others with real-world programming experience.But if you have little to no experience with Kotlin, this book can teach you the concepts and tools that make this language so special, with instructive examples and justifications from some of the language architects themselves. It may come as a surprise that the last 1/3 of this book is about concurrency, but Kotlin provides some very interesting and practical concurrency tools, and this part of the book really shines. Buy the e-book directly from the publisher. I highly recommend this as a foundation for anyone learning Android development today.
Irina –
Elevate Your Kotlin Skills
I started to use Kotlin years ago when it became a second language for Android. When I started I was basically learning what I needed for a particular task and moving on. These days, however, Kotlin is my primary language and I’m writing SDKs that 1000s of people use, so I needed to really develop my understand of all things Kotlin.This book has filled in gaps and made me feel a lot more confident in my Kotlin knowledge. I especially benefited from the chapters on Generics, DSLs, and the section on Concurrency.Whether you’re new to Kotlin or, like me, have been working with it casually for a while, this book is an excellent resource. I highly recommend it for anyone looking to advance their Kotlin skills!
Geovanny Mendoza –
A Must-Have for Developers: Kotlin from the Basics to Asynchronous Programming
This book on Kotlin is an exceptional guide for both beginners and experienced developers looking to delve deeper into the language. It is practical, easy to read and follow. From the basics to advanced techniques such as asynchronous programming with coroutines and streams, each chapter is well structured and full of valuable content. I especially appreciate how the topics are presented in a way that makes it easy to implement the concepts in real projects. It is definitely a work that I will continue to refer to often in the future.
Eric Roberto Silva –
Show many points about kotlin and I learn a lot.
Jason –
ab
nnno –
Good book
Hans2183 –
Love this book, really recommended read for anyone using kotlin for android development. I also have the previous edition (not much has changed).
Luis Antonio Escalante Gutierrez –
Buscaba aprender kotlin. Pero el libro se basa mucho en “como se hacía en java” y muchos ejemplos de Java. Y al final solo habla un mini ejemplo de cómo es en kotlin. Además de que su secuencia en los temas no es coherente.Es más un libro de referencia (tienes que ya saber kotlin) más que de aprendizaje.