进阶day02-泛型接口的使用
This commit is contained in:
10
javaSE-day02/src/com/inmind/generic_interface05/Demo06.java
Normal file
10
javaSE-day02/src/com/inmind/generic_interface05/Demo06.java
Normal file
@@ -0,0 +1,10 @@
|
||||
package com.inmind.generic_interface05;
|
||||
|
||||
public class Demo06 {
|
||||
public static void main(String[] args) {
|
||||
//创建实现类2对象
|
||||
MyInterfaceImpl2<Integer> impl2 = new MyInterfaceImpl2<>();
|
||||
impl2.method1(1);
|
||||
Integer i = impl2.method2();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user