Intermediate Kotlin
Q88 / 100

What is Kotlin's @Synchronized annotation?

Correct! Well done.

Incorrect.

The correct answer is B) Maps to Java's synchronized method modifier, locking on the object instance for the duration of the function

B

Correct Answer

Maps to Java's synchronized method modifier, locking on the object instance for the duration of the function

Explanation

@Synchronized fun update() compiles to a synchronized method on the JVM, acquiring the monitor lock on the object before entering.

Progress
88/100