Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void readStuff(){
- try
- {
- BufferedReader bR;
- bR = new BufferedReader (new FileReader(fileName));
- String fileRead = bR.readLine();
- while ((fileRead = bR.readLine()) != null)
- {
- String[] tokenize = fileRead.split(" ");
- String phNum = tokenize[0];
- String pinNumb = tokenize[1];
- phNumbers.add(phNum);
- pinNums.add(pinNumb);
- }
- bR.close();
- }
- catch (Exception ex)
- {
- JOptionPane.showMessageDialog(null, "File not found.");
- }
- }
- private ArrayList <String> phNumbers = new ArrayList();
- private ArrayList <String> pinNums = new ArrayList();
Add Comment
Please, Sign In to add comment