Get file separator using System class - Java Native OS

Java examples for Native OS:Environment

Description

Get file separator using System class

Demo Code

 
public class Main {
 
        public static void main(String[] args) {
                String strFileSeparator = System.getProperty("file.separator");
               //from   www .j  av  a 2 s  . c om
                System.out.println("File separator is : " + strFileSeparator);
        }
}

Result


Related Tutorials