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() }

16th May 2021, 2:26 AM
Nethran Kumarasamy
Nethran Kumarasamy - avatar
2 odpowiedzi
+ 3
P should be uppercase in `Playing`
16th May 2021, 3:26 AM
Simba
Simba - avatar
+ 1
Thanks for your response, Thank you Very much It works good.
16th May 2021, 3:52 AM
Nethran Kumarasamy
Nethran Kumarasamy - avatar