All pastes #962158 Raw Edit

Anonymous

public text v1 · immutable
#962158 ·published 2008-03-29 15:23 UTC
rendered paste body
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;


public class vg {

	public static void main(String[] args) {

		ArrayList data = new ArrayList();
		BufferedReader input = null;
	    try {
	    	input = new BufferedReader( new FileReader("../failas.txt") );
	    	String line = null;
	    	while (( line = input.readLine()) != null){
	    		data.add(line);
	      }
	    }
	    catch (FileNotFoundException ex) {
	    	ex.printStackTrace();
	    }
	    catch (IOException ex){
	    	ex.printStackTrace();
	    }
	    finally {
	      try {
	        if (input!= null) {
	          input.close();
	        }
	      }
	      catch (IOException ex) {
	    	  ex.printStackTrace();
	      }
	    }
		
	}

}