Kotlin Essentials
42 cards · 🇺🇸 English
Core Kotlin syntax, null safety, and Android-friendly language features.
Study all 42 cards for free
Flashcards, quizzes, pixel-art games and a daily review that remembers for you.
Try the first 10 cards
1 / 10Kotlin
Tap the card for the answer · swipe right if you knew it, left if not
Already have an account? Sign in
Cards
- 1KotlinA cross-platform, statically typed, general-purpose high-level programming language with type inference, designed to interoperate fully with Java
- 2Origin of the name 'Kotlin'It's named after Kotlin Island, a Russian island in the Gulf of Finland near Saint Petersburg
- 3What platforms can Kotlin target?JVM, Android, iOS, JavaScript, WebAssembly, and native code via LLVM (Kotlin/Native)
- 4Are semicolons required in Kotlin?No, semicolons are optional as statement terminators; in most cases a newline is sufficient
- 5Where do data types appear in Kotlin variable declarations?After the variable name, separated by a colon (similar to TypeScript, Pascal, and Rust)
- 6What keyword declares a mutable variable in Kotlin?var
- 7What keyword declares an immutable variable in Kotlin?val
- 8Are Kotlin classes open for inheritance by default?No, all classes are public and final (non-inheritable) by default
- 9What keyword is needed to make a Kotlin class inheritable?open
- 10Are abstract classes in Kotlin open by default?Yes, abstract classes are open by default
- 11Default visibility modifier for Kotlin classes and memberspublic
- 12Four visibility modifiers in Kotlinpublic, internal, protected, and private
- 13'internal' visibility modifierVisible within a module
- 14Entry point function name in a Kotlin programmain
- 15Does Kotlin's main function require parameters?No, parameters are optional since Kotlin 1.3
- 16What symbol is used for string interpolation in Kotlin?$ (dollar sign), e.g., "Hello, $name!"
- 17Extension functions in KotlinFunctions that can be added to any class without creating a derived class, appearing exactly like a function of the class
- 18How many scope functions does Kotlin have, and what are they?Five: let, run, with, apply, and also
- 19What operator unpacks an array's contents as individual arguments in Kotlin?The spread operator asterisk (*)
- 20Destructuring declarations in KotlinA feature that decomposes an object into multiple variables at once, e.g., for ((key, value) in map)
- 21Can you declare local functions inside other functions in Kotlin?Yes, Kotlin allows local functions to be declared inside of other functions or methods
- 22Sealed class in KotlinA class that restricts subclass hierarchies, where all subclasses must be defined at compile time
- 23Data class in KotlinA class whose primary purpose is storing data, with automatically generated equals, hashCode, and toString methods
- 24How does Kotlin handle nullable types?By making a distinction between nullable and non-nullable data types, with nullable objects declared with a '?' postfix
- 25Safe navigation operator in Kotlin?. - used to safely access a method or property of a possibly null object (returns null if the object is null)
- 26Elvis operator in Kotlin?: - a binary operator that returns the first operand if non-null, else the second operand
- 27Does Kotlin support higher-order functions?Yes, Kotlin provides support for higher-order functions and anonymous functions (lambdas)
- 28How are lambda expressions declared in Kotlin?Using braces { }, with parameters declared within the braces followed by the -> operator
- 29Three main compile targets for Kotlin codeKotlin/JVM (Java bytecode), Kotlin/JS (JavaScript), and Kotlin/Native (native code via LLVM)
- 30What Java bytecode version does the Kotlin/JVM compiler produce by default?Java 8 compatible bytecode
And 12 more cards. Study the whole deck free
Articles about this deck
More Programming decks
See all- 🐹
Go Essentials
49 cards · 🇺🇸 English
Core Go syntax: goroutines, channels, slices, and error handling.
- 🐦
Swift Essentials
48 cards · 🇺🇸 English
Core Swift syntax, optionals, and iOS-friendly language features.
- 🦀
Rust Essentials
48 cards · 🇺🇸 English
Ownership, borrowing, and core Rust syntax.
- 🧱
Data Structures
95 cards · 🇺🇸 English
Arrays, linked lists, trees, graphs, hash tables and their core operations.
- 🟣
C#: Fundamentals & .NET Core
99 cards · 🇺🇸 English
Core C# syntax, types, and .NET Core concepts in one deck.
- 🌐
APIs: REST, GraphQL & HTTP Status Codes
108 cards · 🇺🇸 English
REST and GraphQL API concepts plus common HTTP status codes.
