소스 검색

ReadAndPrintScores

Kate Moore 6 년 전
부모
커밋
188c48b122
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3
    0
      kateMoore.md

+ 3
- 0
kateMoore.md 파일 보기

@@ -0,0 +1,3 @@
1
+ReadAndPrintScores.java
2
+
3
+It looks like this code is using the Scanner class to read numbers from a file called score.dat.  Then uses a while loop to check if there is a next int to read.  If this is true, it prints the number.  This code is inside a try block in case it throws an exception.  If something goes wrong the exception handler can take care of it.  Inside the catch block it shows it will signal that an input/ output interruption occurred.  The IOException class was imported to use it.