Question: what is difference between interface and inheritance in java?
Answer: Inheritance is the mechanism in java by which one class is allowed to inherit the features of another class. Interface is the blueprint of the class. ... Like a class, an interface can have methods and variables, but the methods declared in an interface are by default abstract (only method signature, no body).