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

📄 test.java

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

class test
{
	public static void main(String args[]) throws Exception
	{
		boolean x;
		boolean y=false;
		String line;
		
		
		class Do(String args[])
		{
			
			public boolean test()
			{
				try{
					BufferedReader inFile=new BufferedReader(new FileReader(args[0]));
					
					
					while((line=inFile.readLine())!=null)	
					 {
					 	x=line.equalsIgnoreCase("end");
					 	{
					 		if x==true;
					 			return x;
					 		
					 		else
					 			return y;
					 	}
					 		
					 }
				} catch(IOException e){
					System.out.println("an error ["+e+"]");
				}
			}
		}
	
	Do done=new Do();
	if done.test()==x;
	
	{ 
		while((line=inFile.readLine())!=null)	
					 {
							    
							    StringTokenizer nfile=new StringTokenizer(line);
							    if(nfile.countTokens()>1)
							    {
							    									
									int x=line.indexOf(" ");
									String fStr=line.substring(0,x);
									//reWord.addElement(fStr);
									System.out.print(fStr);
									String sStr=line.substring((x+1),line.length());
									//rest.addElement(sStr);
									System.out.println(sStr);
								}
								else
								{
									//reWord.addElement(line);
									System.out.println(line);
									
								}	
							}
				}		
			//else
				System.out.println();
			
	}
}
		

⌨️ 快捷键说明

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