get returns the value associated with key in the Map, or null if key is not present. If there are no null values in the Map, the value returned by get can be used to determine if key is in the Map. However, if there are null values, you have to use containsKey.