int radomInt = new Random().nextInt(999999)
@org.junit.Test public void testName() throws Exception { Random random = new Random(); float radomInt = random.nextInt(999); System.out.println(radomInt == 0 ? "000" : (radomInt<100 ? String.valueOf(radomInt/100).replace(".", "") : String.valueOf(radomInt).replace(".0", ""))); int [] arr = new int[3]; arr[0] = random.nextInt(10); arr[1] = random.nextInt(10); arr[2] = random.nextInt(10); System.out.println(""+arr[0]+arr[1]+arr[2]); }