0

hi please help to print character form a-z and 0-9 randamly in java all the character sholud be present without repetion ie all 26+10 letter sholud print and each time it sholud print differently like First time if it print like this 0 a 2 f g t h y j q 3 v ......
next time f r v c 3 b 5 h 6 j 6................like this
please help me to get this type of result... and i want to store that in a table using Applet

2
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by sharathk60
0

Make an arraylist with all the individual items.

Generate a random number (not larger than the current size of the arraylist) and get then remove that index from the arraylist. Repeat.

Edited by masijade: n/a

0

String[] str={"a","y","z","0","1","2","3","4"};
List<String> list=new ArrayList(Arrays.asList(str));
System.out.println( Collections.shuffle(list));

u wil get the out put each time differntly....

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.