- Can you name two programming paradigms that Kotlin supports?
- Function, reactive, object-oriented
- Is it true or false that Kotlin requires everything to be contained within classes?
- What is a top-level function?
- A function that exists independently of any containing class. Top-level functions are typically defined at the top of a .kt file, but can be placed anywhere within a .kt file as long as it's not within a class or object declaration.
- What are higher-order functions?
- Functions that return other functions, or functions that take other functions as parameters.
- How do you declare a nullable type in Kotlin?
- By adding a ? operator to the end of the type declaration, for example, String?.
- What are the three ways to handle null?
- Using an it/else check
- Using the Elvis operator
- Using the let() function
- Is it true or false that Kotlin code can't be used from Java code?
- False—Kotlin and Java are highly interoperable.