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
import java.util.Random; public class Main { public static void main(String[] args) { Random rand = new Random(); rand.setSeed(42); int first = rand.nextInt(100); rand.setSeed(42); int second = rand.nextInt(100); System.out.println("Same number both times? " + (first == second)); } }
Same number both times? true