[Java daily question] 20161101, java20161101
Package Nov2016; import java. util. hashMap; import java. util. map; public class Ques1101 {public static void main (String [] args) {HashMap <Integer, Integer> map = new HashMap <Integer, Integer> (); for (int I = 0; I <100; I ++) {map. put (I, I);} // traverse 1 for (Integer key: map. keySet () {Integer value = map. get (key); System. out. println (key + "---" + value);} // traverse 2 for (Map. entry <Integer, Integer> entry: map. entrySet () {Integer key = entry. getKey (); Integer value = entry. getValue (); System. out. println (key + "---" + value );}}}
Today's question:
What is the output result of the main program? (Click "[Java daily question] 20161101" below to view issue resolution 20161031)
Questions originally published on the public account and short book: [Java daily question] 20161101, [Java daily question] 20161101
The latest question is published on the public account every day. Welcome to subscribe and exchange progress