(Apologies if the tag is incorrect. I can't find a "Multiplication" tag or similar)
I'm going to be adding a set of 5 numbers up and dividing them to get the average for a java game I am making.
However, there seems to be something wrong with it. I would have thought 15 + 15 / 2 would have been 15, however that seems incorrect.

However, 15 * 2 / 2 yields the expected result.

What is the difference here? Will doing counting up the variables and dividing them by the amount of variables work correctly in my game?
You should probably write $(15+15)/2$ with parentheses and this will yield $15$.
Note that $22.5$ is $15+(15/2)$. In fact Google shows you that this is what it is calculating (taking into account the conventional order of operations).