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

📄 null.java

📁 a Java program that reads a file containing instructions written in self-defined file (TPL in this c
💻 JAVA
字号:
import java.io.*;

class cw3b
{
	public static void main(String args[]) 
	{
			
		if(args.length>=1)
		{
			try{
					BufferedReader inFile=new BufferedReader(new FileReader(args[0]));
					String line;
					int count=0;
					while((line=inFile.readLine())!=null||(line.equalsIgnoreCase("end"))!=true)
					{
							
						System.out.println(line);
						count++;
					}
					System.out.println("TPL finished Ok. ["+(count+1)+"lines processed]");
					inFile.close();
				}catch(IOException e){
					System.out.println("Unexpected end of file: no End");
				}
						
		}
		else
			System.err.println("no command line args");
			

	}
}

⌨️ 快捷键说明

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