fork download
  1. class Main {
  2. public static void main (String[] args) throws java.lang.Exception {
  3. String name = "One\\Two\\Three.";
  4. String[] str = name.split("\\\\");
  5. for(int i =0; i < str.length ; i++)
  6. System.out.println(str[i]);
  7. }
  8. }
  9.  
Success #stdin #stdout 0.09s 212416KB
stdin
Standard input is empty
stdout
One
Two
Three.