I have the following code:
if(!partialHits.get(req_nr).containsKey(z) || partialHits.get(req_nr).get(z) < tmpmap.get(z)){
partialHits.get(z).put(z, tmpmap.get(z));
}
partialHits is a HashMap.
Will JAVA check the second statement if first statement is True ?
For the first statement to be true, the HashMap should not contain the given key therefore if the second statement is checked, we get NullPointerException.
Other way round, consider this condition in JAVA
if(a && b)
if(a || b)
How does this work ?