1.

Explain the difference between abstract class and interface in Java?

Answer»
 Abstract ClassInterface
1.Can have members, constants, defined methods and method stubsCan only have methods stubs and constants
2.Methods and members can be defined with any visibilityMethods must be defined as public
3.May contain non-final variables.Variables declared are by DEFAULT final
14. What do you mean by Marker interface in Java?

It is an interfaces that has no FIELD or methods (empty interface). It helps in conveying to the JVM that the class that is implementing the interface of a category will have special BEHAVIOR. It is also known as TAG interface.

There are 4 major marker interfaces:

  • Searilizable interface
  • Cloneable interface
  • Remote interface
  • ThreadSafe interface


Discussion

No Comment Found