Skip to content

Instantly share code, notes, and snippets.

@NrI3
Last active August 29, 2015 14:23
Show Gist options
  • Save NrI3/705607cd64ea33b6ed17 to your computer and use it in GitHub Desktop.
Save NrI3/705607cd64ea33b6ed17 to your computer and use it in GitHub Desktop.
[ Java ] Lee un archivo linea a linea
private static void readFileLineByLine(String fileName){
try{
FileReader reader = new FileReader(fileName);
BufferedReader buffer = new BufferedReader(file);
String line;
while ( (line = buffer.readLine()) != null ){
show(line);
}
buffer.close();
}catch(Exception e){
}
}
private static void show(String line){
System.out.println(line);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment