Java examples for File Path IO:BufferedReader
Read text file using BufferedReader
package FilesManipulations; import java.io.BufferedReader; import java.io.FileReader; import java.io.IOException; public class ReadTxt { public static void main(String[] args) { try (BufferedReader br = new BufferedReader(new FileReader( "testing.txt"))) { String sCurrentLine;//from ww w . j a va 2 s. co m while ((sCurrentLine = br.readLine()) != null) { System.out.println(sCurrentLine); } } catch (IOException e) { e.printStackTrace(); } } }