You are on page 1of 2

# Questions

1 What are the advantages of the Collection Framework in Java?

2 What do you understand by Collection Framework in Java?

3 List down the primary interfaces provided by Java Collections Framework?

4 Why Collection doesn’t extend the Cloneable and Serializable interfaces?

5 List down the major advantages of the Generic Collection.

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

7 What is the need for overriding the equals () method in Java?

8 How the Collection objects are sorted in Java?

9 What is the use of the List interface?

10 How would you convert an ArrayList to Array and an Array to ArrayList?

11 How will you reverse a List?

12 What do you understand by LinkedList in Java? How many types of LinkedList does Java
support?

13 What is a Vector in Java?

14 What are the various methods provided by the Queue interface?

15 What is a priority queue in Java?

16 What is the Stack class in Java and what are the various methods provided by it?

17 What is Set in the Java Collections framework and list its various implementations?

18 What is the HashSet class in Java and how does it store elements?

19 Can you add a null element into a TreeSet or HashSet

20 Differentiate between Collection and Collections.

21 Differentiate between an Array and an ArrayList.

22 Differentiate between Iterable and Iterator.

23 Differentiate between ArrayList and LinkedList.

24 Differentiate between Comparable and Comparator.

25 Differentiate between List and Set.

26 Differentiate between Set and Map.

27 Differentiate between List and Map.

28 Differentiate between Queue and Stack.

29 Differentiate between PriorityQueue and TreeSet.

30 Differentiate between the Singly Linked List and Doubly Linked List.

31 Differentiate between Iterator and Enumeration.


32 Differentiate between HashMap and HashTable

33 Differentiate between HashSet and HashMap.

34 Differentiate between Iterator and ListIterator.

35 Differentiate between HashSet and TreeSet.

36 Differentiate between Queue and Deque.

37 Need for the Collection framework

38 Explain the hierarchy of the Collection framework in Java

39 What are the advantages of the Collection framework?

40 Difference between ArrayList and HashSet in Java?

41 What will happen if we put a key object in a HashMap which is already there?

42 Explain Collections Class

43 What is the hashCode()?

44 List out benefits of generic collection

45 What are the features of Java Hashmap?

46 What is a Stack?

47 Explain linked list supported by Java

48 Difference between ArrayList and Vector in Java

49 Why you override hashcode, along with equals() in Java

50 Define emptySet() in the Java collections framework

51 Define dictionary class

52 What are the two ways to remove duplicates from ArrayList?

53 Which collection classes are synchronized or thread-safe?

54 What is the difference between peek(), poll(), and remove() method of the Queue interface?

55 How does TreeMap work in Java?

56 Explain the importance of hashCode() and equals() method ? Explain the contract also?

57 Contract of hashCode() and equals() method

58 What is the use of Set Interface? Tell us about the classes implementing this Interface.

59 Can we use Generics with Array?

60 Why do we need Generics? Can you give an example of how Generics make a program more
flexible?

You might also like