I am trying to make Java select 1 random string from a given list.
Example of the list of strings:
1153 3494 9509 2 0 0 0 0
1153 3487 9509 2 0 0 0 0
1153 3491 9525 2 0 0 0 0
1153 3464 9513 2 0 0 0 0
Each row is 1 string
The idea is that it selects one, waits a certain period (like 7200 seconds) and replaces the previous string with another random string from the list (could be the same).
The loop is sort of infinite.
Does anyone knows how to do this?
Ps.
I am pretty much noobie with java :S, so i am afraid just saying i should use an arraylist (for example) wont work 😛
1 Answer