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 types
Functional programming on the JVM
The Kotlin standard library and out-of-the-box features
Writing clean and idiomatic code
Combining Kotlin and Java
Improve code reliability with null safety
Domain-specific languages
Kotlin coroutines and flows
Mastering 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.
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.
Structured concurrency organizes coroutines into parent-child hierarchies, ensuring that parent coroutines wait for their children and manage their cancellation automatically.
[1][2]
State flows are ideal for representing state with a single current value, while shared flows are better for broadcasting events to multiple subscribers.
[1]
Kotlin uses structured concurrency to propagate exceptions, supports supervisors to isolate failures, and provides operators for handling errors in flows.
[1][2]
Kotlin’s support for lambdas with receivers and the invoke convention enables expressive, type-safe DSLs for tasks like HTML building and test frameworks.
[1][2]
Popular tools include Kotest and MockK for testing, kotlinx.benchmark for benchmarking, and Dokka for documentation generation.
[1][2]
what's inside
Guidance from members of the Kotlin team
Domain-specific languages
Kotlin coroutines and flows
about the reader
For readers familiar with Java or another OO language.
about the authors
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.
eBook
$47.99
$23.99
you save $24.00 (50%)
print
$59.99
$29.99
you save $30.00 (50%)
online + audio
$49.99
$24.99
you save $25.00 (50%)
with subscription
$24.99
Will help you write code that reads like a story, not a puzzle.
An excellent and invaluable guide to learning Kotlin.
Takes anxiety out of learning Kotlin ... thorough explanations, easy to follow examples, and thoughtful summaries.
related titles
related titles
choose your plan
pro
monthly
annual
$24.99
$249.99
only $20.83 per month
access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
choose another free product every time you renew
choose twelve free products per year
exclusive 50% discount on all purchases
Kotlin in Action, Second Edition ebook for free
team
monthly
annual
$49.99
$399.99
only $33.33 per month
five seats for your team
access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!