Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package pachet;
- import java.util.*;
- import java.io.*;
- public class Fisiere {
- public static void main(String[] args) {
- String afisare, cale;
- Scanner intrare = new Scanner(System.in);
- System.out.println("Citire cale: ");
- cale = intrare.nextLine();
- try {
- BufferedReader fisier = new BufferedReader(new FileReader(cale));
- while ((afisare = fisier.readLine()) != null) {
- System.out.println(afisare);
- }
- } catch (IOException e) {
- System.out.println(e);
- }
- }
- }
Add Comment
Please, Sign In to add comment