Random.nextGaussian() is supposed to give random no.s with mean 0 and std deviation 1.
Many no.s it generated are outside range of [-1,+1].
how can i set so that it gives n
Doesn't the normal distribution include numbers arbitrarily far from the mean, but with increasingly small probabilities? It might be that your desires (normal and limited to a specific range) are incompatible.