Break the solution down into steps.
First make a java program.
Then make a loop that runs for 10 seconds inside the program.
Once this part works, add a counter to count the loops for the whole 10...