当前位置:网站首页>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


边栏推荐
猜你喜欢

Softmax regression (pytorch)

MySQL reports an error "expression 1 of select list is not in group by claim and contains nonaggre" solution

Knowledge map reasoning -- hybrid neural network and distributed representation reasoning

Training effects of different data sets (yolov5)

Hou Jie -- STL source code analysis notes

Hands on deep learning pytorch version exercise solution - 2.4 calculus

Stroke prediction: Bayesian

Ut2012 learning notes

Unity learning notes: personal learning project "crazy genius Edgar" error correction document

Unity学习笔记:个人学习项目《疯狂天才埃德加》纠错文档
随机推荐
熵值法求权重
Timo background management system
The imitation of jd.com e-commerce project is coming
Leetcode skimming ---44
Multi-Task Feature Learning for Knowledge Graph Enhanced Recommendation
GAOFAN Weibo app
Leetcode skimming ---278
Yolov5 creates and trains its own data set to realize mask wearing detection
安装yolov3(Anaconda)
Leetcode刷题---202
Linear regression of introduction to deep learning (pytorch)
[combinatorial mathematics] pigeon nest principle (simple form examples of pigeon nest Principle 4 and 5)
Hands on deep learning pytorch version exercise solution - 3.1 linear regression
[untitled] numpy learning
Unity小组工程实践项目《最强外卖员》策划案&纠错文档
Detailed cross validation and grid search -- sklearn implementation
The story of a 30-year-old tester struggling, even lying flat is extravagant
Common scenarios in which Seata distributed transactions fail and do not take effect (transactions do not rollback)
[untitled]
Tensorflow—Neural Style Transfer