Case 1
String a = " ";
String[] b = a.split(",");
System.out.println(b.length);
Prints 1. Why?
Case 2
String a = ",,,,,,,,,,,,";
String[] b = a.split(",");
System.out.println(b.length);
Prints 0. Why?
Honestly, i am at a loss here