creates new random value using the cvurren millisecond as a seed,
after that each hit.nextInt(9) will generate a random int less than 9
you do not need to recreate the Random object every time - it will generate different random int less than 9 eech time ytou call it, so you don;t need ti recreate it every time
Open in new window