Advertisement
Momnteiror2m

AppEntrada

Feb 19th, 2016
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.43 KB | None | 0 0
  1. class AppEntrada {
  2.    public static void main(String[] args) throws IOException {
  3.      InputStream is = new FileInputStream("arquivo.txt");
  4.      InputStreamReader isr = new InputStreamReader(is);
  5.      BufferedReader br = new BufferedReader(isr);
  6.  
  7.      String s = br.readLine(); // primeira linha
  8.      
  9.      while (s != null) {
  10.        System.out.println(s);
  11.        s = br.readLine();
  12.      }
  13.      
  14.      br.close();
  15.    }
  16.  }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement