-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBfReader.java
More file actions
42 lines (36 loc) · 1.33 KB
/
BfReader.java
File metadata and controls
42 lines (36 loc) · 1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/**
*
* @author benkimz
*/
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
public class BfReader {
public static void main(String args[]) {
int users = 20;
BufferedReader reader = new BufferedReader(
new InputStreamReader(System.in)
);
do{
users--;
int hours = 0;
try{
hours = Integer.parseInt(reader.readLine());
//handleInput(hours);
}catch(IOException e){
System.out.println("Error: " + e.getMessage());
}
//END OF FILE EXCEPTION HAS REACHED UNEXPECTEDLY [EOFException]
/** Signals that an I/O exception of some sort has occurred.
* This class is the general class of exceptions produced by
* failed or interrupted I/O operations [IOException]
*/
// Signals that an attempt to open the file denoted by a
// specified pathname has failed.[FileNotFoundException]
// Signals that an I/O operation has been interrupted
// [InterruptedIOException]
//DO ANYTHING HERE WITH hours
System.out.print("Entered hours: " + hours);
}while(users > 0);
}
}