Java IO Tutorial - Java File pathSeparator








Syntax

File.pathSeparator has the following syntax.

public static final String pathSeparator

Example

In the following code shows how to use File.pathSeparator field.

import java.io.File;

public class Main {

  public static void main(String[] args) {

    System.out.println(File.pathSeparator);
  }
}

The output: