回答編集履歴
1
コメントを追加
test
CHANGED
@@ -82,6 +82,8 @@
|
|
82
82
|
|
83
83
|
public static void main(String[] args) throws NumberFormatException{
|
84
84
|
|
85
|
+
// ExecutorServiceのオブジェクトを生成
|
86
|
+
|
85
87
|
ExecutorService exec = Executors.newSingleThreadExecutor();
|
86
88
|
|
87
89
|
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
|
@@ -95,6 +97,8 @@
|
|
95
97
|
try{
|
96
98
|
|
97
99
|
if((br.readLine()).equals("")){
|
100
|
+
|
101
|
+
// Workerオブジェクトを生成して別スレッドで実行する
|
98
102
|
|
99
103
|
exec.submit(new Worker());
|
100
104
|
|