当前位置:网站首页>[exercise] HashSet
[exercise] HashSet
2022-07-01 19:43:00 【aigo-2021】
distinguish :
import java.util.HashSet;
public class TestHashSet {
public static void main(String[] args) {
HashSet set=new HashSet();
set.add(1); // In this case, the length is :1 The content is :1
set.add(new Integer(1)); // In this case, the length is :1 1
set.add(new Integer("1")); // In this case, the length is :1 1
set.add(new Integer('1')); // In this case, the length is :2 49
set.add("1"); // In this case, the length is :3 1
set.add('1'); // In this case, the length is :4 1
set.add(new String("1")); // In this case, the length is :4 1 new String It's redundant
System.out.println(set.size()); //4
System.out.println(set); //[1, 49, 1, 1]
}
}边栏推荐
- SQL 入门计划-1-选择
- ffmpeg 音频相关命令
- Wireshark packet analysis TCP, FTP
- DTD modeling
- 对象的创建
- Axure does not display catalogs
- AAAI2020: Real-time Scene Text Detection with Differentiable Binarization
- Why has instagram changed from a content sharing platform to a marketing tool? How do independent sellers use this tool?
- 一文读懂C语言中的结构体
- After studying 11 kinds of real-time chat software, I found that they all have these functions
猜你喜欢
Use the uni app demo provided by Huanxin to quickly realize one-on-one chat

通过js实现金字塔(星号金字塔,回文对称数字金字塔)

【无标题】

axure不显示元件库

Test self-study people must see: how to find test items in software testing?

Oracle物理体系结构

正则表达式=Regex=regular expression
![Thesis reading [distinctive late semantic graph for video capturing]](/img/d4/4f84a73a9127fa87bb0a74c4655d15.png)
Thesis reading [distinctive late semantic graph for video capturing]

科技T3国产平台!成功搭载“翼辉国产实时系统SylixOS”

DDR4 test-2
随机推荐
IPv4 address, subnet mask, gateway
【无标题】
正则表达式=Regex=regular expression
Methods of finding various limits
ffmpeg 音频相关命令
Ffmpeg audio related commands
HLS4ML/vivado HLS 报错解决方案
Native JS creates a calendar - supports mouse wheel scrolling to select months - and can be ported to any framework
servlet知识点
How to correctly use vertx to operate redis (3.9.4 with source code analysis)
Flutter 实战-快速实现音视频通话应用
OpenCV视频质量检测--清晰度检测
音视频、编解码相关电子书、小工具,打包奉送!
自定义插入页面标签以及实现类似通讯录的首字母搜索
How to configure webrtc video streaming format for easygbs, a new version of national standard gb28181 video platform?
Basic knowledge of audio coding and decoding
uni-app商品分类
ffmpeg AVFrame 转 cv::Mat
一文读懂C语言中的结构体
mysql 报错 Can‘t create table ‘demo01.tb_Student‘ (errno: 150)*