WHAT IS MARKER INTERFACE,AND NO METHODS IS NOT THERE ON THAT
INTERFACE THEN WHY WE USED IN JAVA?

Answers were Sorted based on User's Feedback



WHAT IS MARKER INTERFACE,AND NO METHODS IS NOT THERE ON THAT INTERFACE THEN WHY WE USED IN JAVA?..

Answer / ravi

Interfaces without any methos or constants are known as
Marker interface.They are used only to mark or tag a
class.it indicates that class supports that functionality.

Is This Answer Correct ?    7 Yes 0 No

WHAT IS MARKER INTERFACE,AND NO METHODS IS NOT THERE ON THAT INTERFACE THEN WHY WE USED IN JAVA?..

Answer / rameshreddy

it is in depth concept. The compiler developer internally
developed like that, Through that markinterface only(tag
interface) ,compiler identifies its internal functinality

Is This Answer Correct ?    1 Yes 2 No

WHAT IS MARKER INTERFACE,AND NO METHODS IS NOT THERE ON THAT INTERFACE THEN WHY WE USED IN JAVA?..

Answer / olok

compiler treat this type of interface differently.
eg coloneable,serializable

Is This Answer Correct ?    1 Yes 3 No

Post New Answer

More Core Java Interview Questions

What are the types of java languages?

0 Answers  


What is enhanced loop in java?

0 Answers  


Is arraylist sorted in java?

0 Answers  


Break statement can be used as labels in java?

0 Answers  


what is the use of Clonable,and serializable interface?

1 Answers  






What is an immutable class? How to create an immutable class?

0 Answers  


What is the reason that multiple inheritance is not possible in java??

1 Answers  


What is final access modifier in java?

0 Answers  


What's the default access specifier for variables and methods of a class?

0 Answers  


What are singleton services?

0 Answers  


What happens when a thread cannot acquire a lock on an object in java programming?

0 Answers  


Why do you canvas?

0 Answers  


Categories