I wish to get a value from a HasMap but some time the value doesn't exist so I have done this:
int var = 0;
if (hashMapHouse.containsKey("home1") {
var = hashMapHouse.get("houme1");
}
if(var==0) //do something
else //do something else
My question is: is it possible to have one call of hashMap in order to get the value and to test if the value exist or no?