When writing code, a programmer made an error. Look at the code below and fix the error to restore the code to work.
Computer scienceProgramming languagesKotlinObject-oriented programmingObject-oriented programming basic
Visibility for classes, packages, and modules
Small calculator
Report a typo
Write a program in Kotlin
interface InterfaceTask {
protected fun taskFunction(variable: List<Int>)
}
class TaskClass : InterfaceTask {
override fun taskFunction(variable: List<Int>) {
println("${variable[0] + variable[1]}")
}
}
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.