Buscar
Estás en modo de exploración. debe iniciar sesión para usar MEMORY

   Inicia sesión para empezar

level: Collections

Questions and Answers List

level questions: Collections

QuestionAnswer
List interface is the child interface of collections interface. It inhibits a list type data structure where we can store orded collection of objects. It can have duplicate values.List Interface
Arraylist class implements the List interface. It uses a dynamic array to store the duplicate element of different data types. ArrayList Class maintains the insertions order and is non synchronized.ArrayList Class
LinkedList implements the List interface. It can store duplicate elements. It maintains the insertion order and is not synchronized. Maniplation is fast because no shifting is required.LinkedList Class
Implements List interfac. It is similar to ArrayList however it is synchronized and it contains many methods that are not part of the collections framework.Vector
Queue Interface maintains the first-in-first-out order. Ordered List that is used to hold the elements which are about to be processed. It is implemented by PriortyQueue, Deque, and ArrayDequeQueue Interface
PriortyQueue implements the Queue interface. It holds elements or objects that are about to be processed by their priorty. Does not allow null values. Is not synchronizedPriorty Queue
Deque Interface extends the Queue interface. We can remove and add elements from both the side. Deque stands for double ended queue which enables us to perform operations at both the ends.Deque Interface
ArrayDeque class implements the Deque interface. It facilatates us to use the Deque. We can add or delete elements from both the sides. ArrayDeque is faster than Stack and ArrayList. It also has no capacity restrictions.ArrayDeque
Set interface represents the unordered set of elements which doesnt allow us to store the duplicate itams. We can store at most one null value in Set. Set is implemented bny HashSet, LinkedHashSet and TreeSetSet interface
hashSet Class implements the Set interface. It represents the collection that uses a hash table for storage. Hashing is used to store the elements in the hashSet. Contains unique items.HashSet
LinkedHashSet class extends the HashSet class and implements the Set interface. Represents the LinkedList implemention of set Interface. It contains unique elements but maintains the insertion order and permits null elements.LinkedhashSet
Hashmap allows for null keys where Hashtable doesnt allow null keys and values. Hashtable is synchronized but hashMap is not synchronized.HashMap vs Hashtable