Easy learning with example program codes

What is marker interface?

Marker/Tagging Interfaces:

An interface with no methods is known as marker or tagged interface.

Why marker interface used:  

It provides some useful information to JVM/compiler so that JVM/compiler performs some special operations on it. It is used for better readability of code.  Example: Serializable, Clonnable etc.


public interface Interface_Name {



Java interview questions on interface

Please follow and like us:

Copyright © 2019 CodesJava Protection Status SiteMap Reference: Java Wiki