X583: flipCoin

This method simulates flipping a fair coin. It takes an integer parameter, which specifies the number of times that the coin is to be flipped. The method records the result of each flip and returns the results as a String. For example, if the argument is 10, the method may return “HHTHTTTHHT”.

Your Answer:

Reset

Practice a different Java exercise

Feedback

Your feedback will appear here when you check your answer.