0

Java help: how to choose by num specific items you want to see from array.

E.g: if I want to select only Mary and Tony from the word array and display it https://code.sololearn.com/cY7N3GFTVlJ2/?ref=app

11th Nov 2018, 5:41 PM
mya
mya - avatar
6 Respuestas
+ 1
if(num%2==0){ System.out.println (num+"."+word[i]); }
11th Nov 2018, 5:52 PM
LordHill
LordHill - avatar
+ 1
as for randomizing the array, I would look into arrayList .. Much more useful than standard arrays
11th Nov 2018, 6:45 PM
LordHill
LordHill - avatar
0
Rick Morty thank you. how can I select everything from the same array but in a random order
11th Nov 2018, 5:58 PM
mya
mya - avatar
0
Rick Morty the first one that you gave me is too specific. What if I want Mary , Tom and lia. I only gave the Mary and Tony description as an example.
11th Nov 2018, 6:05 PM
mya
mya - avatar
0
your looking for the numbers associated with names you already have?
11th Nov 2018, 6:31 PM
LordHill
LordHill - avatar
0
have you considered a "switch statement"
11th Nov 2018, 6:36 PM
LordHill
LordHill - avatar