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

📄 readfile.java

📁 Reads/writes text as a character stream, buffering characters so as to provide for the efficient rea
💻 JAVA
字号:
import java.io.*;

public class ReadFile{
		public static void main(String[] args) throws IOException{
			File f;
		f=new File("myfile.txt");
			if(!f.exists() && f.length()<0)
			System.out.println("The specified file is either not exist or doesn't contain data");
			else{
				FileInputStream finp=new FileInputStream(f);
			byte b;
		do{
			b=(byte)finp.read();
			System.out.print((char)b);
		}
			while(b!=-1);
				finp.close();
				}
			}
	}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -