Simple Scala string array examples
Scala array FAQ: How do I create a String array in Scala?
There are a few different ways to create String arrays in Scala. If you know all your array elements initially, you can create a Scala string array like this:
val fruits = Array("Apple", "Banana", "Orange")
If you don't know the strings that you want in your array initially, but know the size of your array, you can create it first, then populate it later, like this: