+ 3
15th Jul 2018, 3:24 PM
Nitin bahekar

1 Answer
+ 23
The output is random. "x" may be 0, 1 or 2.
15th Jul 2018, 3:35 PM
Igor Makarsky

Often have questions like this?
Learn more efficiently, for free:
Random rand = new Random(); int x = rand.nextInt(3): System.out.print(x);