Which modifiers are prohibited in interface methods when utilizing Java 17 among the provided options?
* final
* static
* private
* protected
* default
#java #certificationquestion #ocp Answer: final, protected
9.4. Method Declarations
According to the Java SE 17 documentation, the prohibited modifiers in interface methods are final and protected.
The modifiers that are allowed in interface methods are public, private, abstract, default, static, and strictfp.
NB: Thanks Lew for his expert eye (see comments).
https://www.udemy.com/course/ocp-oracle-certified-professional-java-developer-prep/?referralCode=54114F9AD41F127CB99A
Answer: final, protected
9.4. Method Declarations
According to the Java SE 17 documentation, the prohibited modifiers in interface methods are final and protected.
NB: Thanks Lew for his expert eye (see comments).