简体   繁体   中英

On “Redundant 'static' modifier” warning

Within public interface Constants i declared

static final boolean        TREAT_AS_SOURCE     = true

and got a message that it is a redundantly declared as static .

Help me understand why that is?

在接口中声明的所有字段成员默认为publicstaticfinal ,因此,再说一遍是多余的。

默认情况下public, static and final接口中的字段是public, static and final

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM