Can I create any Marker Interface? If yes then how can I
use it???

Answers were Sorted based on User's Feedback



Can I create any Marker Interface? If yes then how can I use it???..

Answer / amit singh

there is no difference between blank inerface and marker
interface
yes we can creae our own marker inerface
interface Xyz
{
}
but is this work for us like a serializable and cloneable
marker inerface
i don't know so please
you do one thing to do your own interface to check only
through the insanceof operator in a clsses those implemen
this interface
thanks amit singh
amitsing2008@gmail.com

Is This Answer Correct ?    9 Yes 4 No

Can I create any Marker Interface? If yes then how can I use it???..

Answer / naveen

Yes, we can create Marker interface, But no use of this type
of interfaces, y because all marker interfaces have contain
special meaning in JVM. But our created marker interface
have no meaning in JVM.

Is This Answer Correct ?    3 Yes 0 No

Can I create any Marker Interface? If yes then how can I use it???..

Answer / diya

public class abc implements Serializable
{
write your own logic
}

Is This Answer Correct ?    0 Yes 3 No

Can I create any Marker Interface? If yes then how can I use it???..

Answer / rama

In my view we can not create marker interfaces. with out defining an interface how will u implement it.serealizble have some predefined methods so called marker interface

Is This Answer Correct ?    1 Yes 8 No

Post New Answer

More Core Java Interview Questions

How do you write a scanner class in java?

0 Answers  


what are variables in java

7 Answers   Wipro,


java can provide security ,how can provide?

8 Answers   Aspire, BNP Paribas, Genpact, IBM,


What is the purpose of a statement block?

1 Answers  


How do you define a singleton class?

0 Answers  






Can we override private methods?

0 Answers  


what is the use of pojo (plain old java objects)? how it is interact with crystal reports? pls urgent

0 Answers  


How do you call a reference in java?

0 Answers  


what is struts-config-xml?and its use?

3 Answers  


Can we synchronize static methods in java?

0 Answers  


How to use Media tracker Class.

0 Answers  


What is the purpose of using java.lang.class class?

0 Answers  


Categories