Advertisement
Guest User

Untitled

a guest
Nov 4th, 2017
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. try(Scanner sc = new Scanner(stackOverFlow)){
  2. sc.useDelimiter(System.lineSeparator());
  3. String wordName;
  4. int wordSum;
  5. while(sc.hasNext()){
  6. String[] next = sc.next().split(";");
  7. wordName = next[0];
  8. wordSum = Integer.parseInt(next[3]);
  9.  
  10. System.out.println(wordName + ": " + wordSum);
  11.  
  12. }
  13. } catch (FileNotFoundException e) {
  14. e.printStackTrace();
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement