Our customer is the Monte Vegas Casino on Planet Diabloblo. Extremely arrogant guys, but they pay well. They've asked us to make an automatic mailing list for potential customers. Don't worry. The junior programmer (you) has been assigned a simple task: create a (last name, salary) dictionary and remove any entries for people whose salary is less than 500 credits.
Only for the rich
- 5
Locked
Comments (9)
- Popular
- New
- Old
You must be signed in to leave a comment
ImDevin
30 April 2021, 17:19
wow, you don't even have to loop through with map.values().removeIf(); Felt almost like cheating, after the last couple of tasks. You can do it the regular way too, however. Happy coding! :)
0
Anonymous #11074513
21 September 2022, 00:35
可以請教你怎麼做到嗎? 可能我想像力有限>"<
0
Lex Icon
13 December 2020, 12:10
HINT:
try to solve it with:
0
Khongpak Phupkdee
5 May 2021, 13:10
Thank you, it very useful and saves time. and without loop
Add HINT from Lex Icon
You can't use
because JAVA8+ It not support 0
Petros
25 July 2020, 01:20
Took 10 minutes to solve and half of that was entering keys and values. As opposed to a WHOLE day for the previous two exercises lol. I hope we get more solidified on HashMaps.
0
Andrei
5 November 2020, 09:45
you could enter keys and values with a loop!
0
hidden #10568956
15 March 2020, 22:44
After hours of trying i got it : use Iterator it and to remove just use it.remove();
0
Geoff Green
11 February 2020, 18:07
Hint: https://dzone.com/articles/removing-elements-from-a-map-in-java
+2
Janusz
23 August 2019, 08:07
What is wrong?
0