Swastik Dey wrote:. . . Correct me if I am wrong.
You are correct. And you need to consider the \\ in both locations. Try this
and see how many \ you get printed out.
Also, in String#split() you are using a regular expression, and \ is an escape character there too. So "\\\\" matches the Sring \\ which is the regular expression to match \. But in the String "s\\a\\b\\\\\\\\\\d" you have one \ between s and a, so you need the regular expession \\, which is expressed as the String literal "\\\\".