Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Jumble ArrayList

 
Ambika Jain
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am having an ArrayList containing 10 elements. I want to jumble to elements in the list everytime I access it. Something like:

[1,2,3,4,5,6,7,8,9,0] should get jumbled up like

[4,5,3,2,6,1,9,8,0,7]

Can you please help me with this ?

Thanks in advance !
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Collections.shuffle()
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic