Constants from File class

ReturnFieldSummary
static StringpathSeparatorThe system-dependent path-separator character, represented as a string for convenience.
static charpathSeparatorCharThe system-dependent path-separator character.
static StringseparatorThe system-dependent default name-separator character, represented as a string for convenience.
static charseparatorCharThe system-dependent default name-separator character.

import java.io.File;

public class Main {

  public static void main(String[] args) {

    System.out.println(File.pathSeparator);
    System.out.println(File.pathSeparatorChar);
    System.out.println(File.separator);
    System.out.println(File.separatorChar);

  }
}

The output:


;
;
\
\
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.