Solved

mixing up an arraylist really good.

Posted on 2004-03-31
9
229 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 

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
 
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
jdbc error in jsp application 20 86
Selenium docs api java index 3 96
Bot application - advice 3 80
spring maven example issues 3 97
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
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…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Suggested Courses

737 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