Lendo arquivo no Java
Uncategorized No Comments »public static void main(String[] args) {
try {
File f = new File(”cliente.txt”);
BufferedReader b = new BufferedReader(new FileReader(f));
while (b.ready()) {
try {
System.out.println(b.readLine());
} catch (IOException ex) {
Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
}
}
} catch (IOException ex) {
Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
}
}
Recent Comments