Consider the following code:
java.util.Map map = new java.util.HashMap(); ... String key = \"A\"; String value = map.
The IF one is preferable.
IF
Its more readable & self explained.
Additionally: execution time is not a big deal, at least here.