Created
October 30, 2009 04:15
-
-
Save fitorec/222113 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Ejemplo simple de lectura de archivos !!! | |
import java.io.BufferedReader; | |
import java.io.File; | |
import java.io.FileReader; | |
import java.io.IOException; | |
import java.util.*; | |
public class FileReader{ | |
public static void main(String[] args) throws IOException { | |
BufferedReader entrada; | |
File archivo = new File("/home/alumnos/Descargas/puntos.txt"); | |
try { | |
entrada = new BufferedReader( new FileReader( archivo ) ); | |
while(entrada.ready()){ | |
System.out.println(entrada.readLine()); | |
} | |
}catch(Exception e){ | |
System.out.println("error "+e); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment