Joined
Last Seen
0 Reputation Points
Unknown Quality Score
No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
0 Endorsements
Ranked #107.41K
Re:
/*I am trying to generate 6 random unique (1-49) no.s and understand that my validation is incorrect.Help Please?*/ [code] import java.util.*; import javax.swing.JOptionPane; public class ranUnique { public static void main(String[] args) { String output=""; int[] arrayRan=new int[6];int ran2; for(int ran=0;ran<arrayRan.length;ran++){ arrayRan[ran]=(int)(Math.random()*50 //validate for(ran2=0;ran2<=ran;ran2++){ if ((arrayRan[ran]==arrayRan[ran2]) || (arrayRan[ran]==0)) { arrayRan[ran]=(int)(Math.random()... … |