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(); } }
原文地址:https://www.cnblogs.com/zhujialei123/p/9275843.html
时间: 2024-11-02 03:49:56