Marker Interface in Java

Marker interface in Java is an interface with empty body. A marker interface does not contain constants or methods, examples of marker interface in Java are- java.util.RandomAccess java.rmi.Remote java.io.Serializable java.lang.Cloneable Marker interface adds special behavior Since marker interface is an empty interface so there are no methods to implement. It…

Continue reading

DelayQueue in Java

DelayQueue in Java is an implementation of BlockingQueue interface and is part of java.util.concurrent package. DelayQueue in Java is an unbounded queue that’s where it differs from ArrayBlockingQueue which is a bounded queue. Delayed interface DelayQueue can store elements only of type Delayed. There is an interface Delayed in Java…

Continue reading