I'm pretty new to Scala and I've hit my first hurdle ...
java.nio.file.Paths has this method:
public static Path get(String first, String ... more)
This java code compiles (and runs):
String[] tokens = new String[] { "/home", "toby", "mydir" };
Path path = Paths.get(tokens[0], Arrays.copyOfRange(tokens, 1, tokens.length -1));
However this scala code does not compile:
import collection.JavaConversions._
...
val tokens = Array("/home", "toby", "mydir")
val path = Paths.get(tokens(0), tokens.tail)
The error I get is "type mismatch; found : Array[String] required: String"
What am I missing? Thanks