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 a marker interface gets its functionality and when we
implements a marker interface how it got invoked

Answer Posted / somasundar m

Marker interface are a design pattern which is used to mark
the classes for doing some specific actions. Marker
interface are just to mark the classes. For example
Serializable is a marker interface. So jvm looks for the
classes which are marked as serializable to serialize the
objects. It tells the compiler that the marked items
should be treated differently. Since it is a older design
pattern. Now a days Annotations has been introduced, so we
can replace the usage of marker interface with annotations.

Is This Answer Correct ?    10 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why does java not allow multiple public classes in a java file ?

4539


Define canvas?

984


What is broken and continue statement?

998


Define class?

1047


Difference between java and javascript

1094


Why is java so popular?

1117


Can we execute a program without main?

1022


What package is math in java?

998


Why is java called java?

1049


What does the “static” keyword mean? Can you override private or static method in java?

1100


What is the generic function?

986


Can vector have duplicates in java?

951


How large is a boolean?

1014


What is memory leak and how does java handle it?

985


What type of variable is gender?

990