Java, like most languages, has an operator preference table.Some languages do no
ID: 3616755 • Letter: J
Question
Java, like most languages, has an operator preference table.Some languages do not need such tables. What style(s) of evaluationremove ambiguity from statements? In other words, how do these languages know that the userwishes to add before multiplying or vice versa? Java, like most languages, has an operator preference table.Some languages do not need such tables. What style(s) of evaluationremove ambiguity from statements? In other words, how do these languages know that the userwishes to add before multiplying or vice versa?Explanation / Answer
Every expression is evaluated using the preferece of theoperators for example / & * has higher precedance as comparedto + or -. if an expression contains many operators than it issolved from left to Right side. for example x=a*b+c first a and b will multiply, then c is added in it. If we wantto change the operation means addition first then multiplicationthen we will write the above expression like this x=a*(b+c) use of parenthesis changes the precedance of the operators.actullay parenthis has higher presedance as compared to otheroperators.Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.