John has 5 different flags that he wants to hang on the wall. How many different ways can the flags be arranged in a row?

The number of ways the flags can be arranged in a row can be calculated using the formula for permutations of n objects, which is n!.

In this case, there are 5 flags, so the number of ways they can be arranged in a row is 5! = 5 x 4 x 3 x 2 x 1 = 120.

Therefore, there are 120 different ways the 5 flags can be arranged in a row.