how to split the string in java in Windows? I used Eg.
String directory=\"C:\\home\\public\\folder\"; String [] dir=direct.split(\"\\\");
String[] a1 = "abc bcd" String[] seperate = a1.split(" "); String finalValue = seperate[0]; System.out.pritln("Final string is :" + finalValue);
This will give the result as abc