how to split the string in java in Windows? I used Eg.
String directory=\"C:\\home\\public\\folder\"; String [] dir=direct.split(\"\\\");
It's because of the backslash. A backslash is used to escape characters. Use
split("\\")
to split by a backslash.