HashMap Comments

Comments

  • "The code below demonstrates most of ArrayList's methods (as shown above), but it's missing certain parts."

    Just guessing, but I think you meant to say HashMap instead of ArrayList up there...

  • HI I ran this in eclipse and am getting the same output as here...
    HashMap map;
    map = new HashMap();

        map.put("user", "pass");
    
    cont...
  • It looks like it could print the items inside the hashmap in a different order (this is because HashMaps do not preserve the order of the elements). I simplified the problem so the correct solution

    cont...
Contact Us
Sign in or email us at [email protected]