Skip to content

Commit 42045f2

Browse files
committed
Update volatile-keyword.md
1 parent f70382a commit 42045f2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

notes/volatile-keyword.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Imagine a situation in which two or more threads have access to a shared object
2424
```java
2525
public class SharedObject {
2626

27-
public int counter = 0;
27+
public int counter = 0;
2828

2929
}
3030
```
@@ -51,7 +51,7 @@ Here is how the `volatile` declaration of the `counter` variable looks:
5151
```java
5252
public class SharedObject {
5353

54-
public volatile int counter = 0;
54+
public volatile int counter = 0;
5555

5656
}
5757
```

0 commit comments

Comments
 (0)