Home » #queue

#queue

Collection

41. Explain important methods of LinkedList? Method Description boolean add( Object o) It is used to append the specified element to the end of the LinkedList. boolean contains(Object o) It a method that returns true if this list contains the specified element. void add (int index, Object element) Inserts the element at the specified element […]

Collection Read More »

Collection

21. What is Random Access Interface?RandomAccess, like the Serializable and Cloneable interfaces, is a marker interface. There are no methods defined in any of these marker interfaces. Rather, they designate a class as having a specific capability. The RandomAccess interface indicates whether or not a given java.util.List implementation supports random access. This interface seeks to define

Collection Read More »

Collection

11. Difference between Set and List?List is an ordered collection of elements and hence it maintains insertion order of elements while Set doesn’t maintain any ordering of the elements. List allows duplicate elements while Set doesn’t allow any elements. List is index-based, i.e.we can access elements in List based on Index, whereas we can’t access

Collection Read More »

Scroll to Top