Q. Which of the following is a marker interface in Java?

A
Runnable
B
Serializable
C
Comparable
D
Cloneable
Solution:

A marker interface like Serializable has no methods and is used to provide metadata to the JVM.

Entri Contact Image

Get Expert Advice for Free: Register for Your Free Consultation Now!