
package lecturacadenas;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;

public class LecturaCadenas {

    public static void main(String[] args)  {   
       try {       
             String cadenaLeida;
             FileReader fileReader = new FileReader(new File("D:\\archivos_creados_Java\\cadenas.dat"));
             BufferedReader bufferedReader = new BufferedReader(fileReader);         
             while ((cadenaLeida = bufferedReader.readLine()) != null) {
                 System.out.println(cadenaLeida);
             }
             fileReader.close();
           } catch (Exception e)
              {System.out.println(e);}        
    }   
}
