Skip to content

Commit e31b43e

Browse files
添加接口
1 parent 9e78096 commit e31b43e

3 files changed

Lines changed: 17 additions & 1 deletion

File tree

src/BOOP/B4Inherit/InheritMain.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package BOOP.B4Inherit;
22

3-
public class InheritMain {
3+
public class InheritMain extends Object{
44
public static void main(String[] args) {
55
Person person=new Person("name",24);
66
Student student=new Student("name", 24, 1);
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package BOOP.B5Interface;
2+
3+
/**
4+
* @author supremepole
5+
*/
6+
public interface MyInterface {
7+
public void sayHello();
8+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package BOOP.B5Interface;
2+
3+
/**
4+
* @author supremepole
5+
*/
6+
public class UseMyInterface {
7+
MyInterface[] myInterfaces=new MyInterface[3];
8+
}

0 commit comments

Comments
 (0)