Advertisement
Guest User

Untitled

a guest
May 22nd, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. import java.io.*;
  2. import java.util.Scanner;
  3.  
  4. public class HelloWorld{
  5.  
  6. public static void main(String []args){
  7. Scanner sc = new Scanner(System.in);
  8. System.out.println("Podaj swoje imie");
  9. String imie = sc.nextLine();
  10. System.out.println("Podaj swoje nazwisko");
  11. String nazwisko = sc.nextLine();
  12. System.out.println("Podaj swoja grupe");
  13. String grupa = sc.nextLine();
  14.  
  15. File plik = new File("java.txt");
  16. try{
  17. BufferedReader read = new BufferedReader(new FileReader("java.txt"));
  18. }
  19. catch(Exception e)
  20. {
  21.  
  22. }
  23. Scanner read1 = new Scanner("java.txt");
  24. while(read1.hasNextLine())
  25. {
  26. System.out.println(read1.nextLine());
  27.  
  28. }
  29.  
  30. }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement