Advertisement
Guest User

Untitled

a guest
Dec 12th, 2019
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. if (sc == 1) {
  2. System.out.println("Choose a deck");
  3. File f = new File(getLoc() + "\\flashcardList.txt");
  4. f.createNewFile();
  5. BufferedReader br = new BufferedReader(new FileReader(f));
  6. int liczbalinijek = 0;
  7. while (br.readLine() != null) {
  8. liczbalinijek++;
  9. }
  10. String[] s = new String[liczbalinijek];
  11. if (liczbalinijek == 0) {
  12. System.out.println("There are no decks currentely created.");
  13. }
  14. String s11 = new String();
  15. for (int i = 0; i < liczbalinijek; i++) {
  16. s[i] = br.readLine();
  17. s11 += s[i] + "/t";
  18. }
  19. System.out.println(s11);
  20. br.close();
  21.  
  22. Scanner dn = new Scanner(System.in);
  23. for (int i = 0; i < liczbalinijek; i++) {
  24. File d = new File(getLoc() + "\\" + s[i] + ".txt");
  25. Scanner fl = new Scanner(d);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement