why marker interfaces are there in java

Answer Posted / srinu

when class implements marker interface our class object
getting special behavoiur.
EX:-
suppose our class implements java.lang.Serializible
interface our class object getting special behaviour(our
class object converting java support format object to
network support)

Another Example our class implements java.rmi.Remote
interface our class object acts as Remote object.

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the java ide’s?

823


Can a method be overloaded based on different return type but same argument type?

767


Differentiate between class and structure.

851


Can a class be declared as protected?

777


Why do we use return statement?

797


Which variable is the independent variable?

796


What is flag in python?

845


Class c implements interface I containing method m1 and m2 declarations. Class c has provided implementation for method m2. Can I create an object of class c?

1314


What are java packages?

832


What is better- service oriented or batch oriented solutions?

1905


Why does the integer quotient -0/3 yield 0, but the double quotient -0.0/3.0 yields – 0.0?

847


Give the hierarchy of inputstream and outputstream classes.

857


If I don't provide any arguments on the command line, then what will the value stored in the string array passed into the main() method, empty or null?

1038


What is the purpose of static methods and variables?

796


What is java used for?

819