Skip to content

Commit 0b7c219

Browse files
committed
lecture
1 parent 7ce42b3 commit 0b7c219

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/java/io/concurrency/chapter11/exam03/ExecutorServiceExample.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ public static void main(String[] args) throws InterruptedException, ExecutionExc
1313

1414
Future<Integer> future1 = executorService.submit(() -> 2);
1515
Future<Integer> future2 = executorService.submit(() -> {
16-
int result = future1.get() + 3;
17-
return result;
18-
// throw new RuntimeException("error"););
16+
return future1.get() + 3;
17+
// throw new RuntimeException("error");
1918
});
2019

2120
int result;
21+
2222
try {
2323
result = future2.get();
2424

0 commit comments

Comments
 (0)