Java tutorial
import java.io.BufferedReader; import java.io.FileReader; public class Main { public static void main(String[] args) throws Exception { String thisLine = null; BufferedReader br = new BufferedReader(new FileReader("c:/test.txt")); while ((thisLine = br.readLine()) != null) { System.out.println(thisLine); } } }