All pastes #769167 Raw Edit

Unnamed

public java v1 · immutable
·published 2007-11-11 05:10 UTC
rendered paste body
/** Class				FileOp* By				Rune Vikestad* E-Mail			vikestad@stud.ntnu.no* Web				http://folk.ntnu.no/vikestad/* Description		IT-1103, Basic Programming (Java), Exercise 6*/import java.io.*;import java.util.*;import javax.swing.JOptionPane;/*** Class: 'FileOp'*/public class FileOp {	/**	* Method: 'main'.	*/	public static void main(String[] args)  throws IOException {		/*		* Variable Declarations	 	*/		String fileName;		File f;		FileReader fr;		BufferedReader bf;		String line;		/*		* Initiate Variables		*/		f = new File("file.in");		fileName = "file.in";		fr = new FileReader(fileName);		bf = new BufferedReader(fr);		Scanner test = new Scanner(fileName);		/*		* Start processing the stream ..		*/		try {			String str = bf.readLine();			StringTokenizer st = new StringTokenizer(str);			/*			* Print tokens			*/				while (st.hasMoreTokens()) {					String fileParseLine = st.nextToken();					System.out.println(fileParseLine);				}		} finally {			bf.close();		}	}}