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 libraryKotlin 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.About the technologyKotlin 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 bookKotlin 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 insideGuidance from members of the Kotlin teamDomain-specific languagesKotlin coroutines and flowsAbout the readerFor readers familiar with Java or another OO language.About the authorSebastian 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 ContentsPART 11 Kotlin: What and why2 Kotlin basics3 Defining and calling functions4 Classes, objects, and interfaces5 Programming with lambdas6 Working with collections and sequences7 Working with nullable values8 Basic types, collections, and arraysPART 29 Operator overloading and other conventions10 Higher-order functions: Lambdas as parameters and return values11 Generics12 Annotations and reflection13 DSL constructionPART 314 Coroutines15 Structured concurrency16 Flows17 Flow operators18 Error handling and testingAPPENDIXESA Building Kotlin projectsB Documenting Kotlin codeC The Kotlin ecosystem