当前位置:网站首页>The linkedhashset set makes the elements orderly without repetition
The linkedhashset set makes the elements orderly without repetition
2022-06-29 02:15:00 【KeytoWINNING】
package haxi;
import java.util.LinkedHashSet;
public class Linkedhashset {
public static void main(String[] args) {
// TODO Automatically generated method stubs
LinkedHashSet<String> s1 = new LinkedHashSet<>();
s1.add("hello");
s1.add("world");
s1.add("java");
for (String string : s1) {
System.out.println(string);
/**
* hello world java
*
*/
}
System.out.println(" Linked list guarantee sequence , Hash guarantees no repetition. Next, add repetition java--------->");
s1.add("java");
for (String string : s1) {
System.out.println(string);
/**
* hello world java Linked list guarantee sequence , Hash guarantees no repetition. Next, add repetition java---------> hello world java
*/
}
}
}
边栏推荐
- Fundamentals of scala (3): operators and process control
- The left toolbar of hbuilder is missing
- MySQL详解 --- 聚合与分组
- 基于 RISC-V SoC 的可配置 FFT 系统设计(1)引言
- e.target与e.currentTarget的区别
- 大智慧手机股票开户哪个券商更安全更方便?
- 11-Go基础:接口
- [從零開始學習FPGA編程-49]:視野篇 - 芯片是如何被設計出來的?
- Chrome browser close update Popup
- Secondary encapsulation of storage (sessionstorage/localstorage) using TS
猜你喜欢

Koa quick start

Oculusrifts and unity UI interaction (1) - Overview

How to become a senior digital IC Design Engineer (4-3)

【Redis】SortedSet类型

Uniapp notes

CTFHub-Web-SQL注入-整数型注入

Use code binding DataGridView control to display tables in program interface

如何成为一名高级数字 IC 设计工程师(4-5)脚本篇:Shell 脚本实现的文件比较操作
![[high concurrency, high performance and high availability of massive data MySQL practice-10] - Implementation of mvcc in InnoDB](/img/dc/a30ccd9943e668aef8c874980a4975.jpg)
[high concurrency, high performance and high availability of massive data MySQL practice-10] - Implementation of mvcc in InnoDB

Finally got the byte offer. The 25-year-old inexperienced experience in software testing is written to you who are still confused
随机推荐
How to manage device authorization
How to become a senior digital IC Design Engineer (4-5) script: file comparison operation implemented by shell script
CTFHub-Web-SQL注入-整数型注入
Interviewer: with the for loop, why do you need foreach??
在按钮禁用时消除hover效果
How to become a senior digital IC Design Engineer (3-5) tools: Spyglass Technology
干货丨微服务架构是什么?有哪些优点和不足?
[redis] sortedset type
How to use project Gantt chart to make project report
2022.02.15
Live broadcast preview | can SQL also play industrial machine learning? Mlops meetup V3 takes you to the bottom!
Which is the best billing method for okcc call center
微信运动自动点赞
【Redis】SortedSet类型
Pyinstaller打包pikepdf失败的问题排查
How to become a senior digital IC Design Engineer (4-3)
什么叫股票线上开户?网上开户安全么?
数字 IC 设计、FPGA 设计秋招笔试题目、答案、解析(2)2021 华为海思(上)
QT basics tutorial: data types and containers
Which brokerage is safer and more convenient to open a stock account for big smart phones?