How can be define MARKER interfce in java

Answer Posted / ravinder

MARKER INTERFACE or TAGGED INTERFACE ARE GIVING SOME SORT
OF INFORMATION ABOUT THAT PARTICULAR OBJECT and it will
giving some marker abt thae object

Generally a interface witout methods are called are
marker/tagged interface..(but this is not corect)

Ex:
clonable,runnable,comparable,serializable


A inrefaces with some ability are ex of marker interface

1)in comparable interface,
one method compare() will be there.......>
.....



ex:
interface Good{}....>gives some infor.abt obj called as it
is good

interface Bad{}

Is This Answer Correct ?    6 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How many bytes is a string?

570


Which is the class in java?

521


How does a for loop work java?

550


Why is the main method declared static?

588


Explain about static imports in java?

601






What is the abstraction?

596


Differentiate between array list and vector in java.

640


What are the four versions of java?

552


What language is pass by reference?

574


What is the difference between throw and throws in java?

559


Explain OOPs concept.

653


What is a boolean flag in java?

571


How do you add an element to a hashset in java?

494


how does the run() method in runnable work? : Java thread

518


What is the old name of java?

507