We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2d117c7 commit 43a2d49Copy full SHA for 43a2d49
javaCodeTest/src/test/java/com/test/demo/Demo.java
@@ -4,7 +4,9 @@
4
import org.junit.jupiter.api.Test;
5
6
import java.util.ArrayList;
7
+import java.util.HashSet;
8
import java.util.List;
9
+import java.util.Set;
10
import java.util.concurrent.atomic.AtomicInteger;
11
12
/**
@@ -24,6 +26,18 @@ void t() {
24
26
System.out.println(list.contains(a)); // true
25
27
28
System.out.println(8899);
29
+
30
+ Set<Long> set = new HashSet<>();
31
+ set.add(2000L);
32
+ set.add(4000L);
33
34
+ int b = 2000;
35
+ long c = 2000L;
36
37
+ System.out.println(set.contains(2000)); // false
38
+ System.out.println(set.contains(b)); // false
39
+ System.out.println(set.contains(c)); // true
40
41
}
42
43
0 commit comments