Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package exceptions;
- import java.io.*;
- public class Lirefichier {
- public Lirefichier(){
- try {
- FileReader f1 = new FileReader("efe.txt");
- int n;
- while ((n = f1.read())!=1)
- System.out.println((char)n);
- f1.close();
- }
- catch(IOException e)
- {
- System.out.println("erreur d'ouverture du fichier");
- }
- }
- public static void main(String[]args) {
- Lirefichier l = new Lirefichier();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement