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

what is use of marker interface? give me good example?

Answer Posted / aravind

In java language programming, interfaces with no methods are
known as marker interfaces. Marker interfaces are
Serializable, Clonable, SingleThreadModel, Event listener.
Marker Interfaces are implemented by the classes or their
super classes in order to add some functionality.

Suppose the interface Clonable is neither implemented by a
class named Myclass nor it's any super class, then a call to
the method clone() on Myclass's object will give an error.
This means, to add this functionality one should implement
the Clonable interface. While the Clonable is an empty
interface but it provides an important functionality.

Is This Answer Correct ?    10 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the use of bufferedreader?

982


Can memory leak in java?

1022


Define a package.

1059


Explain the selection sort algorithm?

1042


What is the default access specifier for variables and methods of a class?

1182


What is the difference between compile-time polymorphism and runtime polymorphism?

977


Which category the java thread do fall in?

980


What is dot operator?

1014


How java is similar to c?

1029


What is difference between fail-fast and fail-safe?

1216


What are the advantages and disadvantages of reference counting in garbage collection?

1000


Howto get an object that will perform date & time calculations then format it for output in some different locales with different date style.can ne1 tel me the answer of this question.pls

1891


What are the three parts of a lambda expression? What is the type of lambda expression?

1015


what is the difference between yielding and sleeping? : Java thread

944


Is a boolean variable?

987