Methods visibility in interface

后端 未结 5 673
借酒劲吻你
借酒劲吻你 2020-12-15 15:16

Do all methods in an Interface has by default Public visibility mode?

5条回答
  •  感动是毒
    2020-12-15 15:39

    All methods in an interface default to public.

    See Java Language Specification 6.6.1 which states

    All members of interfaces are implicitly public.

提交回复
热议问题