Tiada perbezaan, anda akan tahu selepas melihat kod sumber:
/**
* Creates a <i>mutable</i>, empty {@code HashMap} instance.
*
* <p><b>Note:</b> if mutability is not required, use {@link
* ImmutableMap#of()} instead.
*
* <p><b>Note:</b> if {@code K} is an {@code enum} type, use {@link
* #newEnumMap} instead.
*
* @return a new, empty {@code HashMap}
*/
public static <K, V> HashMap<K, V> newHashMap() {
return new HashMap<K, V>();
}
Adakah anda bercakap tentang com.google.common.collect.Maps.newHashMap()?
Tiada perbezaan, anda akan tahu selepas melihat kod sumber: