📄 chapter19n2.java
字号:
/** * program to demonstrate simple handling of files */import java.io.* ;import java.util.* ;public class Chapter19n2 { public static void main(String[] args) throws IOException { BufferedReader din = new BufferedReader(new InputStreamReader(System.in)) ; System.err.print("type a file name: ") ; System.err.flush() ; String fileName = din.readLine().trim() ; File file1 = new File(fileName) ; System.err.print("the file '" + fileName) ; if (file1.exists()) System.err.println("' exists") ; else System.err.println("' does not exist") ; System.err.println("pathSeparator is **" + File.pathSeparator + "**") ; System.err.println("pathSeparatorChar is **" + File.pathSeparatorChar + "**") ; System.err.println("separator is **" + File.separator + "**") ; System.err.println("separatorChar is **" + File.separatorChar + "**") ; } // end of main method } // end of class Chapter19n2
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -