Skip to content

Commit 43a2d49

Browse files
committed
💡 🔖 ⬇️
1 parent 2d117c7 commit 43a2d49

File tree

1 file changed

+14
-0
lines changed
  • javaCodeTest/src/test/java/com/test/demo

1 file changed

+14
-0
lines changed

javaCodeTest/src/test/java/com/test/demo/Demo.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
import org.junit.jupiter.api.Test;
55

66
import java.util.ArrayList;
7+
import java.util.HashSet;
78
import java.util.List;
9+
import java.util.Set;
810
import java.util.concurrent.atomic.AtomicInteger;
911

1012
/**
@@ -24,6 +26,18 @@ void t() {
2426
System.out.println(list.contains(a)); // true
2527

2628
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+
2741
}
2842

2943

0 commit comments

Comments
 (0)