What is an interface in Java?
A. An interface is a way to define a new class based on an existing class.
B. An interface is a way to restrict access to a method or variable.
C. An interface is a collection of abstract methods that can be implemented by classes.
D. None of the above.
Answer:C
What is an interface in Java?
A. An interface is a way to define a new class based on an existing class. B. An interface is a way to restrict access to a method or variable. C. An interface is a collection of abstract methods that can be implemented by classes. D. None of the above.