adspace


What are null interfaces in JAVA ? and give me some
examples?

Answer Posted / shailesh

Null interfaces are just the normal interfaces. But with
these, our classes will be having some additional
functionality. Like, clone() method is not defined in
Cloneable interface but we can make it available for our
class by letting it use cloneable(allowing my class to
clone the objects or just giving permission to do so).
So, these just be treated as a marker interfaces that marks
our class with additional functionality.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Realized?

2266


Write a program to print count of empty strings in java 8?

1087


Write a program to find the whether a number is an Armstrong number or not?

1101


How to sort array in descending order in java?

997


Differentiate between static and non-static methods in java.

1129


What is the difference between equals() and == in java?

1042


What is an object in java and how is it created?

1141


How to create a base64 decoder in java8?

1139


What is a classloader in java?

1091


What is java string pool?

1084


What are the differences between heap and stack memory in java?

1143


What do you mean by an interface in java?

1105


Explain public static void main(string args[]) in java.

1079


Is minecraft 1.15 out?

1046


explain different ways of using thread? : Java thread

1084