Update R.java

Add global Random variable.

Improves resource usage.