📄 contains.java
字号:
import java.util.*;
class Contains
{
public static void main(String[] args)
{
//
Vector v = new Vector(Arrays.asList(
new Object[]{"dog", null, new Integer(7)}));
System.out.println( v.contains("dog") ); // true
System.out.println( v.contains(null) ); // true
System.out.println( v.contains("pig") ); // false
// This shows that although the two Integer objects are different,
// they are considered the same according to their equals() method.
System.out.println( v.contains(new Integer(7)) );// true
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -