package LambdaTest;
public class LambdaTest {
    public static void main(String[] args) {
        // 람다식을 이용한 Runnable 구현
        Runnable task = () -> {
            for (int i = 0; i <= 10; i++) {
                System.out.print(i + " ");
                try {
                    Thread.sleep(500);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            }
        };
        new Thread(task).start();
    }
}
