Learnerslesson
   JAVA   
  SPRING  
  SPRINGBOOT  
 HIBERNATE 
  HADOOP  
   HIVE   
   ALGORITHMS   
   PYTHON   
   GO   
   KOTLIN   
   C#   
   RUBY   
   C++   




LIST - mutableListOf()


Using the 'mutableListOf()' method, we can create a mutable list(i.e. The List values can be changed/replaced).


Example :



fun main() {
    var x = mutableListOf(5, "John", "Kotlin")
    println(x)
}


Output :



 [5, 'John', 'Kotlin']