Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 6946aca

Browse files
author
Rajeev Kumar Singh
committed
Moved the print statement to the end
1 parent 2e45986 commit 6946aca

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎java-lock-objects-and-atomic-variables/src/AtomicIntegerExample.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ public static void main(String[] args) throws InterruptedException {
2828
executorService.submit(() -> atomicCounter.incrementAndGet());
2929
}
3030

31-
System.out.println("Final Count is : " + atomicCounter.getCount());
32-
3331
executorService.shutdown();
3432
executorService.awaitTermination(60, TimeUnit.SECONDS);
33+
34+
System.out.println("Final Count is : " + atomicCounter.getCount());
3535
}
3636
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /