This is first part of the coding interview questions. You may refer the complete list here : Java Coding Interview Questions – Part 1 Java Coding Interview Questions – Part 2 Java Coding Interview Questions – Part 3 Java Coding Interview Questions – Part 4 Java Coding Interview Questions – Part 5 Java Coding Interview …
Continue reading Java Coding Interview Questions – CollectionsCollections
Question 1 Differences between HashMap and Hashtable ? (OR) What are the differences between a HashMap and a Hashtable in Java? Answer There are several differences between HashMap and Hashtable in Java: – Hashtable is synchronized, whereas HashMap is not. This makes HashMap better for non-threaded applications, as unsynchronized Objects typically perform …
Continue reading HashMap, ConcurrentHashMap, HashTable and Collections.synchronizedMap differencesAre you preparing for a Java interview and want to brush up on your ArrayList skills? Look no further! In this post, we’ll go over some of the most commonly asked ArrayList interview questions and provide expert answers and tips to help you succeed. What is ArrayList in Java and how does it differ …
Continue reading Top Java ArrayList Interview Questions & AnswersThis article provides a collection of frequently asked Java HashMap Interview Questions interview questions and answers. Java HashMap Interview Questions Can we synchronize a HashMap ? Can we add duplicate keys in a HashMap ? What happens to the value if we add a duplicate key with new value ? Is is …
Continue reading HashMap Interview Questions in Java1 – Difference between HashTable and HashMap HashMap is not threadsafe whereas HashTable is threadsafe Since HashMap is not synchronized it performs better than HashTable Hashtable does not allow null key, hashmap allows 1 null key & several null values Iterator in hashmap is fail-fast. But enum in Hashtable is not fail-fast. Fail-fast means if …
Continue reading Java Collections Interview Questions