+ 1
Obscure IDE Kotlin Error - Reference MusicPlayer programming exercise Kotlin
https://code.sololearn.com/c2yu3I7n4Oej/?ref=app Can you please help me with this error, it seems to be something to do with the IDE. ?
3 Antworten
+ 2
There are a lot of mistakes and you can compare them with your code
+ 3
abstract class MusicPlayer(){
protected var arr = ArrayList<String>()
abstract fun show()
abstract fun add(name:String)
}
class ModelRx():MusicPlayer(){
override fun add(name :String){
arr.add(name)
}
override fun show(){
for (i in 0..arr.size-1) println (arr[i])
}
}
fun main(args: Array<String>) {
val m = ModelRx()
while(true) {
var input = readLine()!!
if(input == "stop") break
m.add(input)
}
m.show()
}
+ 3
SoloProg Fantastic... but what was the error?