Skip to content

Commit bfa4f78

Browse files
committed
Java 8 新特性 例子小错误修改
1 parent a9330d4 commit bfa4f78

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

docs/java/new-features/java8-common-new-features.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ public interface Runnable{}
176176

177177
```java
178178
@FunctionalInterface
179-
public interface LambdaFunctionalInterface {
179+
public interface LambdaInterface {
180180
void f();
181181
}
182182
//使用
@@ -221,7 +221,7 @@ public class LambdaClassSuper {
221221
}
222222
}
223223

224-
public class LambdaClass {
224+
public class LambdaClass extends LambdaClassSuper {
225225
public static LambdaInterface staticF() {
226226
return null;
227227
}
@@ -243,6 +243,7 @@ public class LambdaClass {
243243

244244
//4. 构造方法调用
245245
LambdaInterface tt = LambdaClassSuper::new;
246+
}
246247
}
247248
```
248249

0 commit comments

Comments
 (0)