add Java solution for pseudo random number generator