Skip to content

Commit e7095c6

Browse files
committed
利用Lamda表达式实现
1 parent 70930f1 commit e7095c6

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
package cn.h5wanbao;
2+
3+
/**
4+
* Created by scott on 7/21/16.
5+
*
6+
* 利用Lamda表达式实现
7+
*
8+
*/
9+
10+
interface MessageLamda {
11+
12+
public void print(String str);
13+
14+
}
15+
16+
public class TestDemoLamda {
17+
18+
public static void main(String[] args) {
19+
20+
MessageLamda msgLa = (String s) -> System.out.println(s);
21+
22+
msgLa.print("Hello World!");
23+
24+
}
25+
26+
27+
}

0 commit comments

Comments
 (0)