How to add elements to a List in Scala (List, ListBuffer)
Briefly

How do I add elements to a Scala List is actually a trick question, because you can't add elements to a Scala List; it's an immutable data structure, like a Java String.
Use ListBuffer when you need a mutable List-like sequence in Scala, allowing additions/removals, which can later be converted back into a List.
Read at alvinalexander.com
[
]
[
|
]