// We can get the separator as a String using File.separator: String fileSeparator = File.separator; // We can also get this separator as a char with File.separatorChar: char fileSeparatorChar = File.separatorChar;