Java tutorial
//package com.java2s; import java.util.Random; public class Main { private static int[] randoms = new int[] { -30, -20, -10, 10, 20, 30 }; private static int getRandom() { int index = new Random().nextInt(5); return randoms[index]; } }