当前位置:网站首页>Set<String>
Set<String>
2022-06-28 08:17:00 【wy_ forty-three million four hundred and thirty-one thousand ei】
HashSet
It has several characteristics , First, it doesn't have duplicate elements , Secondly, it is disordered , In addition, it can contain empty elements .
Set<String> str = new HashSet<String>();
str.add("first");// Additive elements
str.add("second");
str.remove("first");// Remove elements
// Traverse , By iterator
Iterator<String> it = str.iterator();
TreeSet
First of all, it can not write the same data , Second, you cannot write null data , The last data written is ordered
Set<String> str = new TreeSet<String>();
str.add("first");// Additive elements
str.add("second");
str.add("third");
// Traverse , By iterator
Iterator<String> it = str.iterator();
边栏推荐
- Discussion on the application of GIS 3D system in mining industry
- Configuring MySQL multi instance master-slave synchronization for Linux
- Airflow2 configuration windows azure SSO details based on oauth2 protocol
- 设置cmd的编码为utf-8
- sql分析(查询截取分析做sql优化)
- SQL master-slave replication setup
- [JS] - [DFS, BFS application] - learning notes
- Devops foundation chapter Jenkins deployment (II)
- B_QuRT_User_Guide(27)
- 新唐NUC980使用记录:自制开发板(基于NUC980DK61YC)
猜你喜欢

In flood fighting and disaster relief, the city donated 100000 yuan of love materials to help Yingde

Software testing and quality final review

抗洪救灾,共克时艰,城联优品捐赠10万元爱心物资驰援英德

About using font icons in placeholder
![[learning notes] shortest path + spanning tree](/img/38/42b7e321389e3a47304fca5c37a2cf.png)
[learning notes] shortest path + spanning tree

关于如何在placeholder中使用字体图标

MySQL tablespace parsing

Ambari (VII) --- ambari integrated hue4.2 document (valid for personal test)

探讨gis三维系统在矿山行业中的应用
![[learning notes] matroid](/img/e3/4e003f5d89752306ea901c70230deb.png)
[learning notes] matroid
随机推荐
Redis persistence problem and final solution
B_ QuRT_ User_ Guide(26)
Preparation for Oracle 11g RAC deployment on centos7
[learning notes] search
22/02/15 study notes
B_QuRT_User_Guide(30)
Trigonometric transformation formula
安装nrm后,使用nrm命令报错internal/validators.js:124 throw new ERR_INVALID_ARG_TYPE(name, ‘string‘, value)
Oracle RAC -- understanding of VIP
NLP sequence can completely simulate human brain intelligence
【学习笔记】拟阵
你了解TCP協議嗎(二)?
【学习笔记】差分约束
Introduction, compilation, installation and deployment of Doris learning notes
设置网页的标题部分的图标
Is it reliable for the top ten securities companies to register and open accounts? Is it safe?
About ASM disk space full, clean up ASM disk
Three step problem of leetcode
Oracle view all tablespaces in the current library
SLAM中常用的雅克比矩阵J