How to make that traks are randomly chosen each time the player plays an online game

I am creating an online car racing game and I would like to know how to make that tracks are randomly chosen each time the player plays an online game
its an android game

In short, you would have to make an array in GameState perhaps, where you would have the available music tracks in.
When the game starts, you would pick a random index from the music track array in GameState. When the currently playing music ends, you would repeat this (pick another random music track from that array).
I suggest you put the playing music in an AudioComponent so you can adjust volume, add events when the music ends (so that you can switch to another random music).

Feel free to ask more specific questions if you need to.

I’m really sorry to be so stupid but I was talking about the game level race track not a sound track
I’m really sorry that you had bothered to write this text
but I have another question that takes the same principle

I would like to put forward a system
who does lottery kind the same concept
the player looks at an ad then he will have a lot and each lot has a probability example:
a car will have a 3% chance of being recovered
and lots will have more chance like 55% or 65%
I want also that the player have 20 tests a day and when the player plays them all
the lottery will be closed until the next 24 hours
also that the player has the jackpot the lottery is over for him
I know my questions are crazy but
nothing ventured, nothing gained
If you don t know how to answer my question, you can postpone it for me.
if not,i ve posted another question:

and i m creating an android game