Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- try (FileReader arq = new FileReader("C:/teste.txt")) {
- BufferedReader lerArq = new BufferedReader(arq);
- String linha = lerArq.readLine();
- while (linha != null) {
- int numero = Integer.parseInt(linha);
- System.out.println(numero);
- linha = lerArq.readLine();
- }
- } catch (IOException e) {
- System.err.println("Falha ao ler arquivo!");
- e.printStackTrace();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement