Fill the blank
Declare a platform-specific function in common code.
// commonMain
____ fun platformName(): String
// androidMain
// actual fun platformName(): String = "Android ${android.os.Build.VERSION.SDK_INT}"Hint 1 of 1
The pair is expect and actual.
Choose an answer, then open Show answer below to check it.
Show answer
Answer: A expect
Correct. Common code declares it; each platform provides an actual.
Why not the others?
- B actual. That's the platform implementation.
- C abstract. That's for classes.
- D external. That's for native (JNI) functions.