小编Bim*_*rma的帖子

java界面中的默认方法不能是静态的吗?

为什么我们不能用默认静态方法创建接口?

public interface StaticTest {    
  default static void display() {    
     System.out.println("Display here");  
  }  
}
Run Code Online (Sandbox Code Playgroud)

java static default interface

1
推荐指数
1
解决办法
220
查看次数

标签 统计

default ×1

interface ×1

java ×1

static ×1