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?

Answers were Sorted based on User's Feedback



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

Answer / 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

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

Answer / devendra.m

Marker interface is a interface,in which that,it doesn't
have any methods...just which is giving mark to the run time
environment.
clonable,serializable,singleThreadModel are marker interfaces.

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More Core Java Interview Questions

Create a form of user Login in JSP, that accepts the user name and password from user and authenticate it with user names and passwords stored in database. (Plz provide me answer immediately)

1 Answers   ABC,


What are the 6 mandatory procedures for iso 9001?

0 Answers  


Why is multithreading important?

0 Answers  


Which graphs are functions?

0 Answers  


How can a gui component handle its own events?

0 Answers  


What is the loop in java?

0 Answers  


How do you compare values in java?

0 Answers  


Difference between ‘is-a’ and ‘has-a’ relationship in java?

0 Answers  


What is polymorphism in java? What are the kinds of polymorphism?

0 Answers  


What is java console application?

0 Answers  


why applet doesn't have main? isn't possible a program with out main?

9 Answers   TCS,


What is Mutex (Mutual Exclusion Object) ?

0 Answers   Ciena,


Categories