Advertisement
Guest User

Untitled

a guest
Dec 18th, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. public void readFile() throws IOException {
  2.  
  3.  
  4. File file = new File("D:\\slowa.txt");
  5. Scanner sc = new Scanner(file);
  6. String hs;
  7. int i=0;
  8. while(sc.hasNextLine()){
  9. System.out.println(sc.nextLine());
  10. hs=sc.nextLine();
  11. String[] split = hs.split(" ");
  12. String pol = split[0].toString();
  13. String sza = split[1].toString();
  14. String ga = split[2].toString();
  15. String cia = split[3].toString();
  16. Global.tablica[0][i]=pol;
  17. Global.tablica[1][i]=sza;
  18. Global.tablica[2][i]=ga;
  19. Global.tablica[3][i]=cia;
  20. i++;
  21. }
  22.  
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement