factory method pattern diagram

Factory Method Design Pattern – How Factory Works

Factory method design pattern is a creational design pattern that uses factory methods to deal with creating instances without specifying the exact class of the object that will be created. Before you go to example, let us try to understand… Read More!

queue interface

Java Queue Interface, Implementations and Example

A Queue is a collection used to hold multiple elements prior to processing. Besides basic Collection operations, queue interface provides additional insertion, removal, and examine operations as mentioned below. Queue Interface Java SE 8 public interface Queue<E> extends Collection<E> { //Insert operations… Read More!

list interface

The Java List Interface, Implementations and Examples

List interface is an ordered collection (sometimes called a sequence). Lists can contain duplicate elements. The user of a List interface generally has precise control over where in the each list element is inserted and can access elements by their integer… Read More!

set interface

The Java Set Interface, Implementations and Examples

The Set interface is a collection that cannot contain duplicate elements. It models the mathematical set abstraction and is used to represent sets like below Cards comprising a poker hand Courses making up the schedule of a student The processes running… Read More!