当前位置:网站首页>Sequence of map implementation classes
Sequence of map implementation classes
2022-07-03 08:18:00 【Children haha】
Map The implementation classes of are :LinkedHashMap,TreeMap,HashMap
LinkedHashMap: Record the order of adding order . Inherited from HashMap, Than HashMap Added double linked list , The front and back pointers are added to the node ,LinkedHashMap Added in head,tail The pointer
TreeMap: Default ascending order , Red and black trees
HashMap: disorder , Array + Linked list + Red and black trees
// LinkedHashMap Output the results in the order of insertion
Map<Character,Integer> map = new LinkedHashMap<>();
map.put('c',2);
map.put('a',4);
map.put('g',3);
map.put('d',1);
// {c=2, a=4, g=3, d=1}// TreeMap according to key Output results in sequence
Map<Character,Integer> map = new TreeMap<>();
map.put('c',2);
map.put('a',4);
map.put('g',3);
map.put('d',1);
// {a=4, c=2, d=1, g=3}// HashMap disorder
Map<Character,Integer> map = new HashMap<>();
map.put('c',2);
map.put('a',4);
map.put('g',3);
map.put('d',1);
// {a=4, c=2, d=1, g=3}边栏推荐
- Pycharm remote ssh pyenv error: pydev debugger: warning: trying to add breakpoint to file that does
- [cocos creator] Click the button to switch the interface
- Student educational administration management system of C # curriculum design
- tslib库的移植
- Clion toolchains are not configured configure disable profile problem solving
- 链式长取值
- LinkList
- Map的实现类的顺序性
- Abstract classes and interfaces
- Free use until 2015 -- viz artist multi touch plug-in package
猜你喜欢

Solution détaillée de toutes les formules de fonction de transfert (fonction d'activation) du réseau neuronal MATLAB

C language - Introduction - essence Edition - take you into programming (I)

C course design employee information management system

Dotween plug-in

Zohocrm deluge function application time verification

MXone Pro自适应2.0影视模板西瓜视频主题苹果cmsV10模板

WPF:解决MaterialDesign:DialogHost 无法关闭问题

Wechat applet taro learning record

数据库应用技术课程设计之商城管理系统

Youyou1 of xlua knapsack system
随机推荐
oracle 插入单引号
C#课程设计之学生教务管理系统
matlab神经网络所有传递函数(激活函数)公式详解
796 · 开锁
【云原生】微服务之Feign的介绍与使用
Editor Extensions
2020-12-12
jupyter远程服务器配置以及服务器开机自启
ArrayList
Chain length value
Golang 时间格式整理
【K&R】中文第二版 个人题解 Chapter1
Product creation and commercial realization of chat robot (according to La Ma Bang - Dr. Wang Jingjing - speech)
【更新中】微信小程序学习笔记_3
Idea dereference display effect
Golang中删除字符串的最后一个字符
Get to know unity2 for the first time
CLion-Toolchains are not configured Configure Disable profile问题解决
Open the influence list of "National Meteorological Short Videos (Kwai, Tiktok) in November" in an interactive way“
图像处理8-CNN图像分类