Table of Contents
    Home / Definitions / Precedence
    A characteristic of operators that indicates when they will be evaluated when they appear in complex expressions. Operators with high precedence are evaluated before operators with low precedence. For example, the multiplication operator (*) has higher preference than the addition operator (+), so the expression

    2+3*4

    equals 14, not 20.

    You can override precedence rules by surrounding parts of an expression with parentheses. For example,

    (2+3)*4

    would evaluate to 20.

    Was this Article helpful? Yes No
    Thank you for your feedback. 0% 0%