I\'m reading from a .csv File line by line. One line could look for example as following: String str = \"10,1,,,,\".
String str = \"10,1,,,,\"
Now I would like to split according to
Pass -1 (or any negative number, actually) as a second parameter to split:
-1
System.out.println("0,,,,,".split(",", -1).length); // Prints 6.