How do I search for the value of a HashMap element?

1

I have a very strange question, I have a HashMap that has this two values

ids("pergunta","IdP");

The pergunta is a String and IdP is an Int I now to get the value of the IdP I have to do int a = ids.get("IdP"); ?

    
asked by anonymous 12.05.2015 / 16:00

1 answer

1

No, you have to search for key - which in this case is pergunta .

int a = ids.get("pergunta");
    
12.05.2015 / 16:15