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

What is difference between class and object in java?

1032


How to perform linear search in java?

904


What is methods and methodology?

982


Which methods cannot be overridden in java?

935


What are the advantages of arraylist over arrays?

1051


How do you do absolute value in java?

938


Why we go for collections in java?

928


Why is flag used in java?

1004


Explain the features of java?

971


What is ctrl m character?

1008


What is the difference between class forname and new?

960


Can we access the non-final local variable, inside the local inner class?

979


Why string is immutable with example?

919


What are thread local variables?

1069


Is intellij better than eclipse?

1038