What is an interface in Java?
A. An interface is a blueprint for a class that specifies a set of methods that must be implemented by any class that implements the interface.
B. An interface is a data structure that holds a collection of key-value pairs.
C. An interface is a way to restrict access to a method or variable.
D. None of the above.
Answer:A
What is an interface in Java?
A. An interface is a blueprint for a class that specifies a set of methods that must be implemented by any class that implements the interface. B. An interface is a data structure that holds a collection of key-value pairs. C. An interface is a way to restrict access to a method or variable. D. None of the above.