day10-接口的概念&定义格式

This commit is contained in:
2026-05-23 14:46:54 +08:00
parent a7a2d8c51c
commit 2c7b3cc1e7
2 changed files with 19 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
package com.inmind.interface01;
/*
接口Integerface用于定义统一要遵守的规范和规则
*/
public class Demo01 {
}

View File

@@ -0,0 +1,13 @@
package com.inmind.interface01;
/*
接口就是生活中的规范,规则
定义格式
public interface 接口名 {
}
jdk7之前抽象方法常量
jdk8:默认方法,静态方法
jdk9:私有方法
*/
public interface MyInterface {
}