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

Sign Up/ Sign In
Ask a Question

Copyright © 2018 CodesJava Protection Status SiteMap Reference: Java Wiki