Posts Java split backslash
Post
Cancel

Java split backslash

1
2
3
String folders="E:\\folder1\\folder2\\folder3\\folder4";
String[] folder= folders.split("\\\\");
System.out.println(java.util.Arrays.toString(folder));
This post is licensed under CC BY 4.0 by the author.