Apologies for any horrible terminology abuse in the title
I'd like to be able to select each element of an array (or vector etc) randomly, and only select each element once. So if I had {1, 9, 7} I would want to get something like 7 then 1 then 9 returned to me. I've only just started with Java but I've wanted to do this quite a few times already so I wondered if there was some easy way to do this.
I did write my own code (just generating integers to be used as index numbers) so I was hoping someone could tell me that I've ignored some obvious Java class that would do it all for me , or tell me if my own effort is any good.
Cheers!
I'd like to be able to select each element of an array (or vector etc) randomly, and only select each element once. So if I had {1, 9, 7} I would want to get something like 7 then 1 then 9 returned to me. I've only just started with Java but I've wanted to do this quite a few times already so I wondered if there was some easy way to do this.
I did write my own code (just generating integers to be used as index numbers) so I was hoping someone could tell me that I've ignored some obvious Java class that would do it all for me , or tell me if my own effort is any good.
Cheers!