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 82cbaa6

Browse files
committed
Made the lock object final
1 parent 2866ce4 commit 82cbaa6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎src/main/java/com/rampatra/threads/ProducerConsumerUsingWaitNotify.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public class ProducerConsumerUsingWaitNotify {
1212
private static int currSize = 0;
1313
private static int totalSize = 10;
1414
private static int[] buffer = new int[totalSize];
15-
private static Object lock = new Object();
15+
private static finalObject lock = new Object();
1616

1717
static class Producer {
1818
void produce() throws InterruptedException {

0 commit comments

Comments
(0)

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