Java Collections Framework Questions

Q- What is the Java Collections API? List down its advantages?

Q- What are the advantages of the Collection Framework in Java?

Q- Describe the Collection hierarchy in Java?

Q- What is the ConcurrentHashMap in Java and do you implement it?

Q- Can you use any class as a Map key?

Q- Why Map doesn’t extend the Collection Interface?

Q- List down the different Collection views provided by the Map interface in the Java Collection framework?

Q- When to use ArrayList and LinkedList?

Q- What is the advantage of using the Properties file?

Q- What are the various interfaces used in the Collections Framework?

Q- What do you understand by BlockingQueue?

Q- What is the advantage of the Generic Collection?

Q- What do you understand by Fail-Fast and Fail-Safe?

Q- What do you understand by the Iterator in Java Collection Framework?

Q- What is the hash-collision in Hashtable and How it is handled?

Q- What is the Dictionary class?

Q- What is the default size of load factor in hashing based collection?

Q- How to convert Array to ArrayList and vice-versa?

Q- How to make Java ArrayList read-only?

Q- How to remove duplicates from ArrayList?

Q- How to reverse ArrayList?

Q- What is the need for overriding equals() in Java?

Q- How the Collection objects sorted in Java?

Q- Can a null element added to a TreeSet or HashSet?

Q- How to Synchronize ArrayList?

Q- How to sort ArrayList in Descending order?

Q- What is NavigableMap in Java? What its benefits over Map?

Q- What is the priority Queue?

Q- What is Stack class and what are the various methods provided by it?

Q- Can we replace Hashtable with ConcurrentHashMap?

Q- What is CopyOnWriteArrayList, how it is different than ArrayList and Vector?

Q- When does ConcurrentModificationException occur on iteration?

Q- How does HashMap work in Java?

Q- What is the difference between poll() and remove() of Queue interface?

Q- How does HashSet is implemented in Java, How does it using hashing?

Q- When do you use ConcurrentHashMap in Java?

Q- How objects can be sorted on Collection? 

Q- Which Collection classes provide RandomAccess of its elements?

Q- What are the different ways to iterate over a list?

Q- How to make a Collection Thread-Safe?

Q- Can we use any class as a Map key?

Q- Why Map doesn't extend the Collection interface?

Q- Explain emptySet() in Collections Framework?

Q- What is the use of the List interface?

Q- What is WeakHashMap?

Q-What are the Utility classes in the Collection Framework? 


Differences Questions

Q- What are the main differences between Arrays and Collections?

Q-  What is the difference between ArrayList and Vector?

Q- Differences between Set and List?

Q- Differences between List and Map?

Q- Differences between HashSet and HashMap?

Q- Differences between SortedSet and TreeSet?

Q- Differences between ArrayList and LinkedList?

Q- Difference between Collection and Collections?

Q- Difference between Comparable and Comparator?

Q- Differences between Set and Map?

Q- Differences between Queue and Stack?

Q- What is the difference between Iterator and Enumeration?

Q- Difference between Set, List, and Map Collection class?

Q- Difference between Synchronized Collection and Concurrent Collection?

Q- Difference between the length of an Array and the size of ArrayList?

Q- Difference between Singly LinkedList and Doubly LinkedList? 

Q- Difference between Queue and Deque?

Q- Difference between HashMap and TreeMap?

Q- Difference between Iterator and ListIterator?

Q- Difference between HashSet and TreeSet?

Q- Difference between Iterator and Iterable?

Q- Difference between Traditional Collection and Concurrent Collection?

Q- Difference between CopyOnWriteArraySet and synchronizedSet()?

Q- Difference between ConcurrentHashMap and synchronizedMap()?

Comments

Popular posts from this blog

Serialization and Deserialization Questions

Java 8 Interview Questions