Kotlin practice
Every Kotlin exercise, built from a topic you can open beside it.
66 exercises runs offline
All tracks Python 139 JavaScript 184 TypeScript 76 Go 106 Rust 75 Java 81 Kotlin 66 C++ 92 C# 88 Swift 68 PHP 69 Frontend 82 Backend 139 Architecture and system design 25 DevOps and cloud 15 Data and databases 5 Data science 31 AI and LLM engineering 75 Security 26 Game development 26 Coding in the AI era 101 CS foundations 164
level
kt Quiz new How do you distinguish an absent key from a present key whose value is null? Kotlin's core collection types, mutation boundaries, operation pipelines, and lazy sequences, including aliasing and key-collision traps. kt Predict the output new Which output is produced when the terminal operation runs? Kotlin's core collection types, mutation boundaries, operation pipelines, and lazy sequences, including aliasing and key-collision traps. kt Predict the output new What does this program print? Kotlin's core collection types, mutation boundaries, operation pipelines, and lazy sequences, including aliasing and key-collision traps. kt Review AI code new Review generated active product index Kotlin's core collection types, mutation boundaries, operation pipelines, and lazy sequences, including aliasing and key-collision traps. kt Quiz new Which operation triggers evaluation and returns a non-Sequence result? Kotlin's core collection types, mutation boundaries, operation pipelines, and lazy sequences, including aliasing and key-collision traps. kt Spot the bug new Spot the bug in the SKU index Kotlin's core collection types, mutation boundaries, operation pipelines, and lazy sequences, including aliasing and key-collision traps. kt Quiz new Two Packet instances contain distinct byteArrayOf(1, 2) arrays. With data class Packet(va… Define data-class value semantics, understand generated equality, destructuring, and shallow copies, and avoid mutable-key, array, and secret-field traps. kt Quiz new What happens to an initialized class-body property when copy() creates a data-class insta… Define data-class value semantics, understand generated equality, destructuring, and shallow copies, and avoid mutable-key, array, and secret-field traps. kt Quiz new Which properties participate in all generated data-class members by default? Define data-class value semantics, understand generated equality, destructuring, and shallow copies, and avoid mutable-key, array, and secret-field traps. kt Predict the output new What does this program print? Define data-class value semantics, understand generated equality, destructuring, and shallow copies, and avoid mutable-key, array, and secret-field traps. kt Review AI code new Review generated cart snapshot Define data-class value semantics, understand generated equality, destructuring, and shallow copies, and avoid mutable-key, array, and secret-field traps. kt Spot the bug new Spot the bug in the mutable data-class key Define data-class value semantics, understand generated equality, destructuring, and shallow copies, and avoid mutable-key, array, and secret-field traps. kt Quiz new What does val age: Int by values guarantee when values has type Map<String, Any?>? Move Kotlin getter and setter logic into reusable delegates, with precise guidance for lazy, observable, custom delegates, shared state, and thread safety. kt Predict the output new What does this program print? Move Kotlin getter and setter logic into reusable delegates, with precise guidance for lazy, observable, custom delegates, shared state, and thread safety. kt Predict the output new What does this program print after the rejected assignment? Move Kotlin getter and setter logic into reusable delegates, with precise guidance for lazy, observable, custom delegates, shared state, and thread safety. kt Quiz new When is provideDelegate() called for a delegated member property? Move Kotlin getter and setter logic into reusable delegates, with precise guidance for lazy, observable, custom delegates, shared state, and thread safety. kt Review AI code new Review generated account field delegate Move Kotlin getter and setter logic into reusable delegates, with precise guidance for lazy, observable, custom delegates, shared state, and thread safety. kt Spot the bug new Spot the bug in the singleton delegate Move Kotlin getter and setter logic into reusable delegates, with precise guidance for lazy, observable, custom delegates, shared state, and thread safety. kt Quiz new Two nested receiver types carry the same DSL marker. How can the inner block access an ou… Design Kotlin internal DSLs with lambdas with receivers, type-safe builders, explicit scope control, and verifiable result boundaries. kt Predict the output new What does this receiver-based builder print? Design Kotlin internal DSLs with lambdas with receivers, type-safe builders, explicit scope control, and verifiable result boundaries. kt Review AI code new Review generated database DSL Design Kotlin internal DSLs with lambdas with receivers, type-safe builders, explicit scope control, and verifiable result boundaries. kt Spot the bug new Spot the bug in the menu snapshot Design Kotlin internal DSLs with lambdas with receivers, type-safe builders, explicit scope control, and verifiable result boundaries. kt Quiz new What does a staged builder guarantee when only the final stage can produce the result? Design Kotlin internal DSLs with lambdas with receivers, type-safe builders, explicit scope control, and verifiable result boundaries. kt Quiz new A SQL DSL accepts a String and interpolates it into a query. What does Kotlin type checki… Design Kotlin internal DSLs with lambdas with receivers, type-safe builders, explicit scope control, and verifiable result boundaries. kt Quiz new A type and an imported extension both define render() with compatible signatures. Which d… Add functions and computed properties to existing types with receiver syntax, then reason about static resolution, member precedence, nullability, and scope. kt Predict the output new What does the direct call do differently from the safe call? Add functions and computed properties to existing types with receiver syntax, then reason about static resolution, member precedence, nullability, and scope. kt Predict the output new What does this program print? Add functions and computed properties to existing types with receiver syntax, then reason about static resolution, member precedence, nullability, and scope. kt Review AI code new Review generated account label extension Add functions and computed properties to existing types with receiver syntax, then reason about static resolution, member precedence, nullability, and scope. kt Spot the bug new Spot the bug in the retryCount property Add functions and computed properties to existing types with receiver syntax, then reason about static resolution, member precedence, nullability, and scope. kt Quiz new Why omit else from a when expression that lists every member of an enum? Learn Kotlin's read-only references, static types, null safety, expressions, control flow, and function-call boundaries. kt Quiz new count has type Int. Which expression passes it to fun store(value: Long)? Learn Kotlin's read-only references, static types, null safety, expressions, control flow, and function-call boundaries. kt Predict the output new What does this program print? Learn Kotlin's read-only references, static types, null safety, expressions, control flow, and function-call boundaries. kt Review AI code new Review generated invoice total Learn Kotlin's read-only references, static types, null safety, expressions, control flow, and function-call boundaries. kt Spot the bug new Spot the bug in the name-length function Learn Kotlin's read-only references, static types, null safety, expressions, control flow, and function-call boundaries. kt Quiz new Which use site normally requires a boxed representation for @JvmInline value class UserId… Model single-value domain types with `@JvmInline value class`, including JVM representation, boxing boundaries, validation, and Java interop. kt Quiz new What is the dependable way to publish a Java-callable function whose Kotlin API accepts a… Model single-value domain types with `@JvmInline value class`, including JVM representation, boxing boundaries, validation, and Java interop. kt Predict the output new What does this program print? Model single-value domain types with `@JvmInline value class`, including JVM representation, boxing boundaries, validation, and Java interop. kt Review AI code new Review generated API token wrapper Model single-value domain types with `@JvmInline value class`, including JVM representation, boxing boundaries, validation, and Java interop. kt Spot the bug new Spot the bug in the value-class map key Model single-value domain types with `@JvmInline value class`, including JVM representation, boxing boundaries, validation, and Java interop. kt Quiz new Which type means “an optional function that accepts a String and returns an Int”? Lambda expressions turn behavior into statically typed values; learn function types, capture, receivers, return control, and JVM boundaries. kt Predict the output new What does this program print? Lambda expressions turn behavior into statically typed values; learn function types, capture, receivers, return control, and JVM boundaries. kt Predict the output new Which lines are printed when the trailing lambda is passed? Lambda expressions turn behavior into statically typed values; learn function types, capture, receivers, return control, and JVM boundaries. kt Review AI code new Review generated event registry Lambda expressions turn behavior into statically typed values; learn function types, capture, receivers, return control, and JVM boundaries. kt Spot the bug new Spot the bug in callback index capture Lambda expressions turn behavior into statically typed values; learn function types, capture, receivers, return control, and JVM boundaries. kt Quiz new Which type allows both the list itself and each element to be null? Model missing values with nullable types, smart casts, safe calls, and Elvis, then keep NPEs out of Java and generated-code boundaries. kt Quiz new An unannotated Java method returns a platform String type. Which first step keeps the Kot… Model missing values with nullable types, smart casts, safe calls, and Elvis, then keep NPEs out of Java and generated-code boundaries. kt Predict the output new What does this program print? Model missing values with nullable types, smart casts, safe calls, and Elvis, then keep NPEs out of Java and generated-code boundaries. kt Review AI code new Review generated customer importer Model missing values with nullable types, smart casts, safe calls, and Elvis, then keep NPEs out of Java and generated-code boundaries. kt Spot the bug new Spot the bug in the changing host getter Model missing values with nullable types, smart casts, safe calls, and Elvis, then keep NPEs out of Java and generated-code boundaries. kt Quiz new A family of parsers needs one shared constructor-owned cache and a fixed parse template. … Build clear object boundaries with classes, interfaces, inheritance, and composition; understand Kotlin's final defaults, dispatch, and construction order. kt Quiz new BillingService needs to send audit records through interchangeable destinations. Which re… Build clear object boundaries with classes, interfaces, inheritance, and composition; understand Kotlin's final defaults, dispatch, and construction order. kt Quiz new Which declaration permits a subclass to replace calculate()? Build clear object boundaries with classes, interfaces, inheritance, and composition; understand Kotlin's final defaults, dispatch, and construction order. kt Predict the output new What does this program print? Build clear object boundaries with classes, interfaces, inheritance, and composition; understand Kotlin's final defaults, dispatch, and construction order. kt Review AI code new Review generated notification service Build clear object boundaries with classes, interfaces, inheritance, and composition; understand Kotlin's final defaults, dispatch, and construction order. kt Spot the bug new Spot the bug in the account balance Build clear object boundaries with classes, interfaces, inheritance, and composition; understand Kotlin's final defaults, dispatch, and construction order. kt Quiz new For value of type String?, which statement about value.let and value?.let is correct? Choose among Kotlin's let, run, with, apply, and also by receiver and return value, without nullable, nested-receiver, or chain-type mistakes. kt Predict the output new What does lookup("known") print when the receiver exists but the let block returns null? Choose among Kotlin's let, run, with, apply, and also by receiver and return value, without nullable, nested-receiver, or chain-type mistakes. kt Predict the output new What does this program print? Choose among Kotlin's let, run, with, apply, and also by receiver and return value, without nullable, nested-receiver, or chain-type mistakes. kt Review AI code new Review generated signup registry Choose among Kotlin's let, run, with, apply, and also by receiver and return value, without nullable, nested-receiver, or chain-type mistakes. kt Spot the bug new Spot the bug in the nested it receiver Choose among Kotlin's let, run, with, apply, and also by receiver and return value, without nullable, nested-receiver, or chain-type mistakes. kt Quiz new Which declaration best models one implementation that is both a known Failure variant and… Model finite states with restricted hierarchies, use exhaustive when to catch new cases, and choose correctly among sealed classes, interfaces, and enums. kt Quiz new Where may a direct subclass of a sealed class be declared in Kotlin 2.4.10? Model finite states with restricted hierarchies, use exhaustive when to catch new cases, and choose correctly among sealed classes, interfaces, and enums. kt Predict the output new What does this program print? Model finite states with restricted hierarchies, use exhaustive when to catch new cases, and choose correctly among sealed classes, interfaces, and enums. kt Predict the output new What does this program print? Model finite states with restricted hierarchies, use exhaustive when to catch new cases, and choose correctly among sealed classes, interfaces, and enums. kt Review AI code new Review a generated payment hierarchy Model finite states with restricted hierarchies, use exhaustive when to catch new cases, and choose correctly among sealed classes, interfaces, and enums. kt Spot the bug new Spot the bug in delivery state labeling Model finite states with restricted hierarchies, use exhaustive when to catch new cases, and choose correctly among sealed classes, interfaces, and enums.
No practice items match these filters.