Guest User

Untitled

a guest
Mar 21st, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. public void readStuff(){
  2. try
  3. {
  4. BufferedReader bR;
  5. bR = new BufferedReader (new FileReader(fileName));
  6. String fileRead = bR.readLine();
  7.  
  8.  
  9.  
  10. while ((fileRead = bR.readLine()) != null)
  11.  
  12. {
  13. String[] tokenize = fileRead.split(" ");
  14. String phNum = tokenize[0];
  15. String pinNumb = tokenize[1];
  16.  
  17. phNumbers.add(phNum);
  18. pinNums.add(pinNumb);
  19.  
  20.  
  21. }
  22.  
  23.  
  24.  
  25.  
  26. bR.close();
  27. }
  28. catch (Exception ex)
  29. {
  30. JOptionPane.showMessageDialog(null, "File not found.");
  31. }
  32.  
  33. }
  34.  
  35. private ArrayList <String> phNumbers = new ArrayList();
  36. private ArrayList <String> pinNums = new ArrayList();
Add Comment
Please, Sign In to add comment