0
In last project of kotlin I entered correct answer. My output and excepted output are same but says me the error available
This my code class MusicPlayer { private var songs: Array<String> = arrayOf() //your code goes here fun add(track: String ){ songs += track } fun show(){ for(song in songs ){ println(song) } } fun play(){ println ("playing " + songs[0]) } } fun main(args: Array<String>) { val m = MusicPlayer() while(true) { var input = readLine()!! if(input == "stop") { break } m.add(input) } m.show() m.play() }
2 odpowiedzi
+ 3
P should be uppercase in `Playing`
+ 1
Thanks for your response, Thank you Very much It works good.