I tried executing the code and the loop executed fine without any changes
Results Obtained :
E:\JAVA\OOPS\Game>
java Game
Enter Name of game, if you would like to stop then type 'stop'
Game1
How many games in stock: 2
What is the games price: 10
This is what you entered
Name: Game1
Item Number: 0
Price of game: $10.0
Total games in stock: 2.0
Total vaule: $20.0
Enter Name of game, if you would like to stop then type 'stop'
Game2
How many games in stock: 3
What is the games price: 20
This is what you entered
Name: Game2
Item Number: 1
Price of game: $20.0
Total games in stock: 3.0
Total vaule: $60.0
Enter Name of game, if you would like to stop then type 'stop'
Game3
How many games in stock: 4
What is the games price: 40
This is what you entered
Name: Game3
Item Number: 2
Price of game: $40.0
Total games in stock: 4.0
Total vaule: $160.0
Enter Name of game, if you would like to stop then type 'stop'
Game4
How many games in stock: 10
What is the games price: 20
This is what you entered
Name: Game4
Item Number: 3
Price of game: $20.0
Total games in stock: 10.0
Total vaule: $200.0
Enter Name of game, if you would like to stop then type 'stop'
Game5
How many games in stock: 5
What is the games price: 8
This is what you entered
Name: Game5
Item Number: 4
Price of game: $8.0
Total games in stock: 5.0
Total vaule: $40.0
Name: Game1
Item Number: 0
Price of game: $10.0
Total games in stock: 2.0
Total vaule: $20.0
Name: Game2
Item Number: 1
Price of game: $20.0
Total games in stock: 3.0
Total vaule: $60.0
Name: Game3
Item Number: 2
Price of game: $40.0
Total games in stock: 4.0
Total vaule: $160.0
Name: Game4
Item Number: 3
Price of game: $20.0
Total games in stock: 10.0
Total vaule: $200.0
Name: Game5
Item Number: 4
Price of game: $8.0
Total games in stock: 5.0
Total vaule: $40.0
The value of the entire inventory is: $480.0
E:\JAVA\OOPS\Game>