Posted On: Apr 07, 2020
List can be defined as the type of ordered collection that regulates the elements in the insertion order. It also allows duplicate elements. Inside the List interface, new methods are introduced. Listiterator can insert a List in both forward and backward directions. The list is implemented to store objects that are non-unique according to the instruction order.
Set can be defined as a type of unordered collection in which elements do not maintain any order. All the elements inside a Set are unique. The set interface does not introduce any new interface. Only collection interface methods can be implemented in the Set subclasses. The set can be inserted only in the forward direction with the assistance of an iterator.
Never Miss an Articles from us.
Singleton class in Java contains only one object at one time. For the designing of the singleton class, the construction needs to be private. The static method needs to be written to return the object...
When one class extends for more than one class, then it is known as multiple inheritance. No, Java does not support multiple inheritance to prevent the ambiguity that it can cause. The diamond proble...
JPA or Java Persistence API is a mechanism through which JAVA can outlive the application processes that have created them. JPA allows you to define which objects are persisted and how they should be ...