Correct overriding

Report a typo

Look at this snippet of code:

fun main() {
    var five = highFive()
}

class Six(var six: Int) {
    var seven: String = "seven"
    var nine: Int = seven.length
}

fun highFive(): Int {
   var eight: Int = 8
   return 5
}

For which of these variables can you write your own accessors?

Select one or more options from the list
___

Create a free account to access the full topic