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 Marker interface in java? and what is clone?

Answer Posted / ramesh.m

1)By implementing for interface,our object can get some
ability such type interfaces called as "marker/ability/tag
interfaces".

Ex:
By implementing Serializable interface,our objects can able
to travel across network and can able to save the file
persistently.

2)If any interface does not contain any methods, it is
always called "marker interface".

Ex:
Serializable ,Clonable,RandomAccess,SingleThreadModel.

in these cases,JVM will provide required ability
automatically.

3)Even though interface contains methods by implementing
that interface if our objects will get some ability still we
can consider it as marker interface.

Ex:
Comparable [compareTo()method],Runnable[run() method] etc.

in these cases,required ability should be provided by
programmer.

Is This Answer Correct ?    9 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What will happen when using pass by reference in java?

992


Why is java multithreaded?

992


What is the exact difference in between unicast and multicast object? Where we will use?

999


Why wait and notify methods are declared in object class?

1041


what is encapsulation in java? Explain

1116


How to find the largest value from the given array.

1012


What is an class?

1036


How do you trim a space in java?

983


What is primitive data type in java?

986


How do you test a method for an exception using junit?

1210


What is bytecode verifier?

943


Explain the difference between extends thread vs implements runnable in java?

1132


Can we override the private methods?

1010


What is the type of lambda expression?

1025


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

1029