When a hash conflict occurs, a linked list will be used to resolve the conflict, but the probability of a hash conflict is very small, and the map will automatically expand to reduce conflicts.
For using final, the Java compiler will ensure that the final field must have been written before reading, that is, ensuring that writing occurs before reading, to avoid writing after reading and reading unexpected values under multi-thread concurrency conditions.
When a hash conflict occurs, a linked list will be used to resolve the conflict, but the probability of a hash conflict is very small, and the map will automatically expand to reduce conflicts.
For using final, the Java compiler will ensure that the final field must have been written before reading, that is, ensuring that writing occurs before reading, to avoid writing after reading and reading unexpected values under multi-thread concurrency conditions.
Portal:java memory model final