Q:

Write a program in Kotlin to get length of the given string

belongs to collection: Kotlin programming Exercises

0

Write a program in Kotlin to get length of the given string

He was cryling very loud.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

Solution:

fun main(args : Array<String>)  {  
	val s = "He was cryling very loud."
	val str = "$s.length is ${s.length}"
	println(str)
}

Output:

He was cryling very loud..length is 25

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

How to get average of the given array elements in ... >>
<< Write a program in Kotlin to replace is with was r...