Run Code  | API  | Code Wall  | Users  | Misc  | Feedback  | Login  | Theme  | Privacy  | Patreon 

[JAVA] Cool thing about iterating a map with iterator.

Language: Layout:
+ ] Show input
Compilation time: 1.56 sec, absolute running time: 0.31 sec, cpu time: 0.25 sec, memory peak: 18 Mb, absolute service time: 1,88 sec  
edit mode |  history  | discussion
Error(s), warning(s):
Exception in thread "main" java.lang.UnsupportedOperationException
	at java.util.AbstractCollection.add(AbstractCollection.java:262)
	at Rextester.main(source.java:73)
key: car, -----  value: 1394870 
key: buisness, -----  value: 2387894 
key: vacation, -----  value: 2938793 
key: experience, -----  value: 92840478 
key: gadgets, -----  value: 1472933443 





key : buisness  ===   price : 2387894
key : vacation  ===   price : 2938793
key : experience  ===   price : 92840478
key : gadgets  ===   price : 1472933443		** REMVED **



final keySet : [buisness, vacation, experience]



final map (priceMap) : 
{buisness=2387894, vacation=2938793, experience=92840478}	<<-- see all the changes are preserved