how to generate 6 random numbers in ascending order
here is my code i dont how to generate the 6 numbers and i already sorted it public static void main(String[] args) { int [] aryNums; aryNums = new int [52]; aryNums[0] = 1; aryNums[30] = 31; aryNums[1] = 2; aryNums[31] = 32; aryNums[2] = 3; aryNums[32] = 33; aryNums[3] = 4; aryNums[33] = 34; aryNums[4] = 5; aryNums[34] = 35; aryNums[5] = 6; aryNums[35] = 36; aryNums[6] = 7; aryNums[36] = 37; aryNums[7] = 8; aryNums[37] = 38; aryNums[8] = 9; aryNums[38] = 39; aryNums[9] = 10; aryNums[39] = 40; aryNums[10] = 11; aryNums[40] = 41; aryNums[11] = 12; aryNums[41] = 42; aryNums[12] = 13; aryNums[42] = 43; aryNums[13] = 14; aryNums[43] = 44; aryNums[14] = 15; aryNums[44] = 45; aryNums[15] = 16; aryNums[45] = 46; aryNums[16] = 17; aryNums[46] = 47; aryNums[17] = 18; aryNums[47] = 48; aryNums[18] = 19; aryNums[48] = 49; aryNums[19] = 20; aryNums[49] = 50; aryNums[20] = 21; aryNums[50] = 51; aryNums[21] = 22; aryNums[51] = 52; aryNums[22] = 23; aryNums[23] = 24; aryNums[24] = 25; aryNums[25] = 26; aryNums[26] = 27; aryNums[27] = 28; aryNums[28] = 29; aryNums[29] = 30; Arrays.sort(aryNums); int i; for (i=0; i<aryNums.length; i++) {System.out.println("winning number are" + aryNums[i]);} } }