Guest User

Untitled

a guest
Nov 25th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. package pachet;
  2.  
  3. import java.util.*;
  4. import java.io.*;
  5.  
  6. public class Fisiere {
  7. public static void main(String[] args) {
  8. String afisare, cale;
  9. Scanner intrare = new Scanner(System.in);
  10.  
  11. System.out.println("Citire cale: ");
  12.  
  13. cale = intrare.nextLine();
  14. try {
  15. BufferedReader fisier = new BufferedReader(new FileReader(cale));
  16. while ((afisare = fisier.readLine()) != null) {
  17. System.out.println(afisare);
  18. }
  19. } catch (IOException e) {
  20. System.out.println(e);
  21. }
  22.  
  23. }
  24. }
Add Comment
Please, Sign In to add comment