Help me solve this please. been trying for about 2 hours now. and this is the last piece of code i need for my main program. help would be appreciated. thanks.
import javax.swing.*; public class random { public static void main(String[]args) { int resultNum [] = {50,50,50,50,50,50}; for(int x = 0;x<6; x++) { resultNum[x] = 0 + (int)(Math.random() * ((29 - 0) + 1)); for(int y=5;y>6;y++) { if(resultNum[x] == resultNum[y]) { resultNum[x] = 0 + (int)(Math.random() * ((29 - 0) + 1)); break; } else { resultNum[x] = resultNum[x]; break; } } } JOptionPane.showMessageDialog(null, resultNum[0] + " " + resultNum[1] + " " + resultNum[2] + " " + resultNum[3] + " " + resultNum[4] + " " + resultNum[5] ); } }