Write a program to create a list containing elements 10,11,12,”Good”,”Morning” and print the number of elements in the list, delete elements 11,12 from the list and print the number of elements again.
Answers
Answered by
1
This is in Kotlin :
fun main(){
var a = mutableListOf(10, 11, 12, "Good Morning")
print(a.length)
a[1] = null
a[2] = null
print(a.length)
}
Similar questions
Math,
3 months ago
Math,
3 months ago
Math,
3 months ago
Math,
7 months ago
Science,
7 months ago
Social Sciences,
1 year ago
Social Sciences,
1 year ago