Guest User

Untitled

a guest
Feb 18th, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. FileInputStream fin;
  2. try {
  3. fin = new FileInputStream ("Files/Test1.txt");
  4. }
  5. catch (FileNotFoundException fnfe) {
  6. System.out.println ("File not Found!\n" + fnfe);
  7. }
  8. try {
  9. int k;
  10. while ((k = fin.read ()) != -1)
  11. System.out.print ((char) k);
  12. fin.close ();
  13. }
  14. catch (IOException ioe) {
  15. System.out.println ("I/O Exception\n" + ioe);
  16. }
Add Comment
Please, Sign In to add comment