Java OCA OCP Practice Question 1266

Question

Which modifier can be applied to an interface method?

  • A. protected
  • B. static
  • C. private
  • D. final


B.

Note

Interface methods are implicitly public.

Option A and C are incorrect.

Interface methods can also not be declared final, whether they are static, default, or abstract methods, making Option D incorrect.

Option B is the correct answer because an interface method can be declared static.




PreviousNext

Related