Random number generator in Java
Introduction
The keyword final protects variables from changes.
A random integer from a range
The following code will help to generate a random integer from 0 to 4 inclusive
randomNumber = (int)(Math.random()*5);
javac -encoding utf8 Main.java
Article author: Andrei Olegovich