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...

why marker interfaces are there in java

Answer Posted / maurya

an interface without any method is known as marker
interface. we use marker interface to actually mark for JVM
to distinguish that the class is belongs or subclass of ant
particular super class.
EX-->
we have an interface named serializable. there is a
condition that if you want to serialize your object u must
have to implements marker interface.
by doing this we just only inform JVM that my class is able
to be serialized. JVM detact it at run time by using Class
class methods.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we call a non-static method from inside a static method?

957


What are the application of stack?

858


Is it possible to write a regular expression to check if string is a number?

971


What is a map? What are the implementations of map?

1039


What is object english?

1005


What is treeset in java collection?

918


What is the use of arrays tostring () in java?

986


Is null or empty java?

928


What is the difference between compare and compareto in java?

946


What is static class

1053


What is java instanceof operator?

985


Explain different types of thread priorities ?

1036


Can extern variables be initialized?

893


Can a class with private constructor be extended?

877


Why doesn't the java library use a randomized version of quicksort?

932