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


边栏推荐
猜你喜欢
Redis 笔记 01:入门篇
![[untitled]](/img/2b/177970366174e50e75b5c820c95d08.jpg)
[untitled]

Automatic derivation of introduction to deep learning (pytoch)

Jupiter notebook changing font style and font size

【SQL】一篇带你掌握SQL数据库的查询与修改相关操作

The story of a 30-year-old tester struggling, even lying flat is extravagant

Class-Variant Margin Normalized Softmax Loss for Deep Face Recognition

多层感知机(PyTorch)

Handwritten digit recognition: CNN alexnet

Knowledge map enhancement recommendation based on joint non sampling learning
随机推荐
High imitation wechat
Ut2011 learning notes
Hands on deep learning pytorch version exercise solution-3.3 simple implementation of linear regression
Ind FHL first week
Data preprocessing - Data Mining 1
Leetcode刷题---1385
GAOFAN Weibo app
[combinatorial mathematics] pigeon's nest principle (simple form of pigeon's nest principle | simple form examples of pigeon's nest principle 1, 2, 3)
The imitation of jd.com e-commerce project is coming
Leetcode skimming ---1385
Preliminary knowledge of Neural Network Introduction (pytorch)
User recommendation preference model based on attention enhanced knowledge perception
Seata分布式事务失效,不生效(事务不回滚)的常见场景
Several problems encountered in installing MySQL under MAC system
Raspberry pie 4B installs yolov5 to achieve real-time target detection
ECMAScript -- "ES6 syntax specification # Day1
Ut2012 learning notes
Practical part: conversion of Oracle Database Standard Edition (SE) to Enterprise Edition (EE)
Classification (data consolidation and grouping aggregation)
Leetcode刷题---278