摘要: public class TestMap { public static void main(String[] args) { Map<String, Object> map = new HashMap<String, Object>(); map.put("aaa", 111); map.put( 阅读全文
posted @ 2019-05-10 16:54 宁静致远think 阅读(635) 评论(0) 推荐(0) 编辑
摘要: List<String> list = new ArrayList<String>();list.add("aaa");list.add("bbb");list.add("ccc");方法一:超级for循环遍历for(String attribute : list) { System.out.pri 阅读全文
posted @ 2019-05-10 16:52 宁静致远think 阅读(145) 评论(0) 推荐(0) 编辑
摘要: 1.迭代遍历: Set<String> set = new HashSet<String>(); Iterator<String> it = set.iterator(); while (it.hasNext()) { String str = it.next(); System.out.print 阅读全文
posted @ 2019-05-10 16:48 宁静致远think 阅读(318) 评论(0) 推荐(0) 编辑