Solved

mixing up an arraylist really good.

Posted on 2004-03-31
9
223 Views
Last Modified: 2008-03-06
With the list that is collected from the number of checkboxs checked: (code below)

// Audio files from checkboxs
if (cb.isSelected())
{
  File audio = new File(cb.getActionCommand());
  list.add(audio);  // method to add audio to ListOfFiles
}


How could I mix those files in the arraylist up really good.

0
Comment
Question by:Drop_of_Rain
  • 4
  • 2
  • 2
  • +1
9 Comments
 
LVL 86

Assisted Solution

by:CEHJ
CEHJ earned 75 total points
ID: 10727225
Collections.shuffle(list)
0
 
LVL 18

Accepted Solution

by:
bobbit31 earned 75 total points
ID: 10727231
Collections.shuffle(<yourArrayList>);
0
 
LVL 92

Expert Comment

by:objects
ID: 10727260
you should have already known the answer to that ;) You already use that technique in your existing code.
0
 

Author Comment

by:Drop_of_Rain
ID: 10727289
I thought that was it but I might need to shuffle them a couple of times. I looked at it shuffled once that is why i asked the question. Another dump question i have asked.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 92

Expert Comment

by:objects
ID: 10727328
> Another dump question i have asked.

No such thing as dumb (or dump) questions :)
0
 

Author Comment

by:Drop_of_Rain
ID: 10727380
That was funny seeing what I wrote.
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 10727482
?
0
 

Author Comment

by:Drop_of_Rain
ID: 10727487
I increased the points bt 75 because you both gave the same answer.

Thanks,
Christopher
0
 

Author Comment

by:Drop_of_Rain
ID: 10727511
bobbit31 answered another question just a little while ago, it would have worked fine, so I gave him this one because of that. I hope that is OK with everyone.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
bitbucket vs gitbucket 3 57
get weblogic logged in user in java 2 58
session migration servlets 2 26
Windows 10 IE Certificate Issue 10 42
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
This video teaches viewers about errors in exception handling.

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now