Which of the below is a property of Interface, in java?
i. Interfaces can be used as a types, just like classes to declare variables.
ii. all functions in the interfaces are by default public and abstract.
iii. all variable initialization in interfaces are by default public static final.
All the given options are true about Interfaces.
Note: Using interfaces as types means you can create variables for an Interface, just like how you do for classes.
default all variables are public static final, and methods are public abstract. So you can omit those keywords while declaring.
Back To Top