当前位置:网站首页>Set ArrayList nested map set loop traversal
Set ArrayList nested map set loop traversal
2022-07-03 10:42:00 【Vue learning】
static void Demo2() {
HashMap<String,String> mp=new HashMap<>();
mp.put("zc", "adf");
mp.put("za", "aas");
mp.put("zb", "acc");
HashMap<String,String> mp2=new HashMap<>();
mp2.put("asd", "111");
mp2.put("222", "212");
mp2.put("333", "312");
ArrayList<HashMap<String,String>> array=new ArrayList<>();
array.add(mp);
array.add(mp2);
for(HashMap<String,String> mapkey:array) {
Set<String> s=mapkey.keySet();
for(String kk:s ) {
String v=mapkey.get(kk);
System.out.println(kk+"--"+v);
}
}
}Output results


边栏推荐
- Data preprocessing - Data Mining 1
- 2021-09-22
- Type de contenu « Application / X - www - form - urlencoded; Charset = utf - 8 'not supported
- extern关键字
- Common scenarios in which Seata distributed transactions fail and do not take effect (transactions do not rollback)
- Numpy quick start (II) -- Introduction to array (creation of array + basic operation of array)
- Timo background management system
- Ut2015 learning notes
- Ut2014 learning notes
- Simple real-time gesture recognition based on OpenCV (including code)
猜你喜欢

High imitation bosom friend manke comic app

Simple real-time gesture recognition based on OpenCV (including code)

I really want to be a girl. The first step of programming is to wear women's clothes

Weight decay (pytorch)

Ut2017 learning notes

Class-Variant Margin Normalized Softmax Loss for Deep Face Recognition

ThreadLocal原理及使用场景

权重衰退(PyTorch)

Softmax 回归(PyTorch)

Ind wks first week
随机推荐
Leetcode刷题---263
C语言项目:学生成绩系统
A complete mall system
【吐槽&脑洞】关于逛B站时偶然体验的弹幕互动游戏魏蜀吴三国争霸游戏的一些思考
Pytoch has been installed, but vs code still displays no module named 'torch‘
Leetcode skimming ---832
二分查找法
[untitled]
Tensorflow—Image segmentation
Leetcode skimming ---263
Softmax 回归(PyTorch)
Leetcode刷题---1
Leetcode skimming ---217
Jetson TX2 brush machine
[ultra detailed] implement soft and hard interval SVM based on sklearn
EFFICIENT PROBABILISTIC LOGIC REASONING WITH GRAPH NEURAL NETWORKS
六、MySQL之数据定义语言(一)
Common scenarios in which Seata distributed transactions fail and do not take effect (transactions do not rollback)
[SQL] an article takes you to master the operations related to query and modification of SQL database
High imitation bosom friend manke comic app