Question: what is the difference between interface and inheritance?
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).