執行 ❯
獲取您
自己的Java
伺服器
×
更改方向
更改主題,深色/淺色
前往 Spaces
public class Main extends Thread { public static void main(String[] args) { Main thread = new Main(); thread.start(); System.out.println("This code is outside of the thread"); } public void run() { System.out.println("This code is running in a thread"); } }
這段程式碼線上程之外
這段程式碼正線上程中執行