Let’s read the docs:
The following table lists the operators in order of precedence, with the highest-precedence ones at the top.[…]
Associativity Operators Additional Information
================== =============== ======================
non-associative instanceof types
right ! logical
So instanceof has higher priority, thus both statements are equivalent. Parenthesis are probably used to make it obvious so you don’t need to look it up in the documentation.