```java
public class HowToCreateThread {
static public class MyThread extends Thread {
@Override
public void run() {
// TODO 自动生成的方法存根
System.out.println("Hello MyThread");
}
}
static public class MyRun implements Runnable {
@Override
public void run() {
// TODO 自动生成的方法存根
System.out.println("Hello MyRun");
}
}
public static void main(String[] args) {
// TODO 自动生成的方法存根
new MyThread().start();
new Thread(new MyRun()).start();
new Thread(()->{
System.out.println("Hello lambda");
}).start();;
}
}