java8 lambda表达式初接触

环境是jdk8

代码如下:

package memTest;

/**
 * Created by PC on 2014/8/5.
 */
public class LambdaOne {

    public static  void test(){
        new Thread(()-> System.out.print("hi") ).start();
    }

    public static void main(String[] args) {
        new  LambdaOne().test();
    }
}

 

posted @ 2014-08-05 22:50 oh~NO! 阅读(...) 评论(...) 编辑 收藏