Advertisement
Mastercpp

Lectura de ficheros

Sep 20th, 2015
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.30 KB | None | 0 0
  1.     try{
  2.             FileReader archivo = new FileReader("numeroRandom.java");
  3.             BufferedReader buffer = new  BufferedReader(archivo);
  4.             String texto;
  5.             while((texto = buffer.readLine()) != null){
  6.                 System.out.println(texto);
  7.             }  
  8.         }catch(Exception ex){
  9.             System.out.println(ex.getMessage());
  10.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement