Refactor volatile (#2444)
This commit is contained in:
committed by
GitHub
parent
3b5d9585ed
commit
6db067d2c9
@@ -4,7 +4,7 @@ package com.baeldung.concurrent.volatilekeyword;
|
||||
public class SharedObject {
|
||||
private volatile int count=0;
|
||||
|
||||
public void increamentCount(){
|
||||
void increamentCount(){
|
||||
count++;
|
||||
}
|
||||
public int getCount(){
|
||||
|
||||
Reference in New Issue
Block a user