Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- try(Scanner sc = new Scanner(stackOverFlow)){
- sc.useDelimiter(System.lineSeparator());
- String wordName;
- int wordSum;
- while(sc.hasNext()){
- String[] next = sc.next().split(";");
- wordName = next[0];
- wordSum = Integer.parseInt(next[3]);
- System.out.println(wordName + ": " + wordSum);
- }
- } catch (FileNotFoundException e) {
- e.printStackTrace();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement