Today was a deep dive into operator precedence in Java. It mostly follows the same rules as PEMDAS P- Parentheses, E- Exponents, M- Multiplication, D- Division, A- Addition, and S- Subtraction for order of operations.
Seems like a simple concept but it did get tricky for me once you start adding the modulus operator into a long equation such as 15 / 3 % 2 * (6+2) or 9 % 5 % 2 equals what?
So what I learned was that * takes precedence over the % operator and if you have several modulus operators next to each other it is left to right. Here is a good chart from Princeton.edu