SHARE
TWEET

Untitled

a guest Apr 19th, 2019 85 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import java.util.Map;
  2. import java.util.concurrent.ConcurrentHashMap;
  3.  
  4. class Test {
  5.     public static void main(String[] args) {
  6.         Map<String, Object> foodData = new ConcurrentHashMap<>();
  7.         foodData.put("penguin", 1);
  8.         foodData.put("flamingo", 2);
  9.         for(String key: foodData.keySet())
  10.             System.out.println(foodData.remove(key));
  11.     }
  12. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top