What is an interface in Java? How does it differ from an abstract class?
An interface is a blueprint for a class that defines a set of methods (abstract) that must be implemented by any concrete class that implements the interface. An abstract class is a class that can have both abstract and concrete methods, and it can't be instantiated. A class can implement multiple interfaces but can only extend one abstract class.