An interface may be declared as public or abstract
In Core Java, an interface declaration can have the following modifiers:
- public: An interface can be declared as public, which means it can be accessed from other packages.
- abstract: Interfaces are implicitly abstract; you don’t need to use the
abstract
keyword explicitly. However, if you do use it, it won’t cause an issue. - strictfp: This modifier is used to specify that the methods in the interface follow the strict floating-point format.
Therefore, the correct answer is: public
and abstract
.