Interview Zone

Prepare to explain, not recite.

Strong interviews come from understanding the reason behind a concept.

01Why does HashMap allow one null key?

HashMap handles a null key as a special case. A strong answer connects this to hash/bucket implementation.
Open detail

02ArrayList vs LinkedList — when would you choose each?

Compare access patterns, insertion/deletion, memory overhead and actual workload.
Open detail

03What is the difference between == and equals()?

For objects, == compares references while equals() is intended for logical equality. Also discuss hashCode.
Open detail

04What problem does Dependency Injection solve?

It separates object creation from object usage, reducing coupling and improving testing.
Open detail

05What happens when a Java class is loaded?

Think class loading, linking and initialization, then connect it to class loaders and bytecode.
Open detail

06HashMap vs ConcurrentHashMap?

Discuss thread safety, concurrent access and coordination rather than only saying one is synchronized.
Open detail