import
;
import
;
public
class
Demo {
public
static
void
main(String[] args) {
Map<Integer,Integer> m =
new
HashMap<Integer,Integer>();
(
1
,
1
);
print(m);
(
1
,
2
);
print(m);
}
private
static
void
print(Map<Integer, Integer> m) {
for
(<Integer, Integer> mm : ())
(
"K: "
+()+
",V: "
+());
}
}
//供参考,重新放一个相同的key,会自动覆盖value的。