belongs to collection: Kotlin programming Exercises
Write a program in Kotlin to replace is with was respectively in given string
He is cryling ver loud.
Solution:
fun main(args : Array<String>) { var a = "He is cryling very loud." val s = "${a.replace("is", "was")}" println(s) }
Output:
He was cryling very loud.
total answers (1)
start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.
Solution:
Output:
need an explanation for this answer? contact us directly to get an explanation for this answerHe was cryling very loud.