Run ❯
Get your
own Java
server
❯
Run Code
Ctrl+Alt+R
Change Orientation
Ctrl+Alt+O
Change Theme
Ctrl+Alt+D
Change Language
Go to Spaces
Ctrl+Alt+P
public class Main { static class MyThread extends Thread { public void run() { System.out.println("This code is running in a thread"); } } public static void main(String[] args) throws InterruptedException { MyThread thread = new MyThread(); thread.start(); thread.join(); System.out.println("The thread is finished"); } }
This code is running in a thread
The thread is finished