Skip to content

Commit 15ab9b9

Browse files
committed
lambda Expression
1 parent c4f6c71 commit 15ab9b9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/com/example/concurrency/features/volatileExample/VolatileExample.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public static void main(String[] args) {
4040
while(sc.hasNext()){
4141
String value = sc.next();
4242
if("1".equals(value)){
43-
new Thread(() -> aVolatile.stopThread()).start();
43+
new Thread(aVolatile::stopThread).start();
4444
break ;
4545
}
4646
}

0 commit comments

Comments
 (0)