package com.day18.Thread;

public class ThreadFour {

    public static void main(String[] args) {
        new Thread("Lakers") {
            public void run() {
                System.out.println(this.getName()+"  Kobe");
            }
        }.start();
        
        new Thread("Celtics") {
            public void run() {
                System.out.println(this.getName()+"  KG");
            }
        }.start();
    }

}

 

相关文章:

  • 2021-10-06
  • 2021-10-22
  • 2021-08-30
  • 2022-01-01
  • 2021-12-29
  • 2021-06-22
猜你喜欢
  • 2022-12-23
  • 2021-04-12
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-12
  • 2022-01-26
相关资源
相似解决方案