Possible outputs

Report a typo

Here's a class named SomeClass:

class SomeClass {

    @Synchronized
    fun method1() {
        println("a thread entered method1")
        method2()
        println("a thread left method1")
    }

    @Synchronized
    fun method2() {
        println("a thread entered method2")
        println("a thread left method2")
    }

    @Synchronized
    fun method3() {
        println("a thread entered method3")
        println("a thread left method3")
    }
}

Two threads have a reference to one instance of the class. The first thread invokes method1, and the second thread invokes method3 at the same time. Select all possible outputs:

Select one or more options from the list
___

Create a free account to access the full topic