📄 filedemo1.java
字号:
/**Why the file always can't be created?Answer:you must create a file first then you can have the implementations 2004.11.19
*My first java file program
*2004.11.15. xhcprince
*/
import java.io.File;
class fileDemo1
{
public static void main(String args[])
{
File test = new File("E:\\my.doc");
System.out.println("File name: " + test.getName());
System.out.println("File path: " + test.getPath());
System.out.println("File exist? " + test.exists());
System.out.println("File size: " + test.length());
System.out.println("File last modified: " + test.lastModified());
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -