Solved

mixing up an arraylist really good.

Posted on 2004-03-31
9
222 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
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

705 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

15 Experts available now in Live!

Get 1:1 Help Now