Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How does marker interface provides functionality to the
implemented class ?

or How dose maker interface gets the functionalities as
serialization or cloning.

Answer Posted / somasundar m

Marker interface is a an interface which doesnot have any
variables and methods. Since it is following the design
pattern called Marker Design Pattern its is called as
Marker interface. This marker interface just tells the
compiler that all the marked classes with certain interface
names should be treated differently. It is used just to
mark the selected classes to do a certain functionality.
Example Serializable, Clonnable, etc. Here Serializable is
a marker interface just compiler to indentify which are the
classes should be marked for serialization. Now it can be
replace with annotations.

Is This Answer Correct ?    9 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is lazy programming?

960


What is ‘has a’’ relationship in java?

1153


What is the purpose of file class?

962


What are assembly attributes?

948


What all access modifiers are allowed for top class ?

1138


Is java still necessary?

1003


What is static in java?

1020


What is character in data type?

919


What is generic type?

976


What is an infinite loop in java? Explain with an example.

974


How many bits are used to represent unicode, ascii, utf-16, and utf-8 characters in java programming?

957


What is a newline character in java?

984


When arithmeticexception is thrown?

965


What is difference between overloading and overriding in java?

967


What is widening and narrowing in java? Discuss with an example.

984