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 consumer in java?

979


What are the drawbacks of reflection?

1017


What is integer valueof?

1116


What is a values collection view ?

1092


How to create an immutable class?

1112


Does java return by reference?

1016


How can you traverse a linked list in java?

1129


Why java is called not pure object oriented language?

1026


Why main() method is public, static and void in java ?

1104


What is ‘is-a ‘ relationship in java?

1043


Explain the difference between intermediate and terminal operations in java8?

1116


What are the uses of java?

1094


Enlist diffrent types of inheritance supported by java?

918


Difference between serialization and deserialization in java?

1148


Explain the difference between transient and volatile in java?

1005