Overriding interface's variable?

后端 未结 4 2040
抹茶落季
抹茶落季 2020-12-10 04:29

As I read from various Java book and tutorials, variables declared in a interface are constants and can\'t be overridden.

I made a simple code to test it

<         


        
4条回答
  •  悲&欢浪女
    2020-12-10 05:05

    Default signature for any variable in an interface is

    public static final ...
    

    So you cannot override it anyhow.

提交回复
热议问题