Intermediate Kotlin
Q59 / 100

What is a value class (inline class) in Kotlin?

Correct! Well done.

Incorrect.

The correct answer is A) A class that wraps a primitive for type safety without allocation overhead at runtime

A

Correct Answer

A class that wraps a primitive for type safety without allocation overhead at runtime

Explanation

@JvmInline value class Email(val value: String) gives type safety (Email vs String) but is represented as String in JVM bytecode, avoiding boxing.

Progress
59/100