I am trying to get a subarray in scala, and I am a little confused on what the proper way of doing it is. What I would like the most would be something like how you can do
You can call the slice method:
scala> Array("foo", "hoo", "goo", "ioo", "joo").slice(1, 4) res6: Array[java.lang.String] = Array(hoo, goo, ioo)
It works like in python.