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

Can you declare a private method as static?

0 Answers   TCS,


Why map is used in java?

0 Answers  


What is java literals?

0 Answers  


How Vector class is synchronized,How to build user defined class as synchronized?

0 Answers  


What is the differences between heap and stack memory in java? Explain

0 Answers  






What are latest features introduced with java 8?

0 Answers  


List some important characteristics on jre

0 Answers  


what happens when a thread cannot acquire a lock on an object? : Java thread

0 Answers  


Can we have try block without catch block?

0 Answers  


What will be the output of round(3.7) and ceil(3.7)?

0 Answers  


Can java cast null?

0 Answers  


What is thread pool in java with example?

0 Answers  


Categories