Which is the Best Java Web Framework ?

Java - Interview Questions and Answers on "Marker Interfaces"

Q1.  What are Marker Interfaces ? Name few Java marker interfaces ?

Ans. These are the interfaces which have no declared methods.

Serializable and cloneable are marker interfaces.

Q2.  Is runnable a Marker interface ?

Ans. No , it has run method declared.

Q3.  Difference between serializable and externalizable interface ?

Ans. Serializable is a marker interface whereas externalizable  is not.

Q4.  What is a cloneable interface and what all methods does it contain?

Ans. It is not having any method because it is a MARKER interface.

Q5.  What is the purpose of marker interfaces ?

Ans. They just tell the compiler that the objects of the classes implementing the interfaces with no defined methods need to be treated differently. 

Subscribe to Java News and Posts. Get latest updates and posts on Java from Buggybread.com
Enter your email address:
Delivered by FeedBurner
comments powered by Disqus


Try our new Java Interview Questions Search Tool.

There are more than 1000 questions with practice tests.

It's updated daily and It's Awesome.


Try our new Java Practice Test tool.

There are more than 200 questions and expanding quickly. It's updated daily and It's Awesome.