Code output

Report a typo

Look at the code below. What will it print?

open class A {
    open fun foo(arg1: Int) {
        println("A: arg1 = $arg1")
    }
}

class B : A() {
    override fun foo(arg2: Int) {
        println("B: arg2 = $arg2")
    }
}

fun main() {
    val b = B()
    b.foo(arg1 = 5)
}
Select one or more options from the list
___

Create a free account to access the full topic