⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 filedemo1.java

📁 JAVA程序设计课程中各章节的程序实例。
💻 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 + -