Assign the variable
"list" to a list with no elements
scala val list = Nil
object SolutionXX extends Application {
val list = Nil
}
scala val list = List()
object SolutionXX extends Application {
val list = List()
}
scala val list : List[String] = List()
object SolutionXX extends Application {
val list : List[String] = List()
}
Submit a new solution for
scala
There are 19 other solutions in
additional languages (
cpp,
csharp,
erlang,
fsharp ...)