Use classes, branches, simple while loops, arithmetic, output.Complete the code provided so that it plays 10000 games of craps. In the game of craps, two six- sided dice are rolled. A roll of 7 or 11 automatically wins, and a roll of 2, 3, or 12 automatically loses. If any other number is rolled, that number becomes the point. The player keeps rolling the dice until either 7 or the point is rolled. If the point is rolled, the player wins, but if 7 is rolled, the player loses.1. Complete the playCraps() method which is found in the Java class called Craps (in a file named Craps.java), which is provided for you.2. Modify the main method in HW2 to:play 10000 games,count how many times the player wins and loses.output the wins and losses and the probability of winning (wins / (wins + losses)).label and format the output neatly, showing the probability as a percentage.