Which Of These Lines Of Java Code Will Give Better Performancep #119
Which of these lines of Java code will give better performance?</p> <pre><code class="language-txt"> 1. a | 4 + c >> b & 7; 2. (a | ((( 4 * c ) >> b ) & 7 ))</code></pre>
This multiple choice question (MCQ) is related to the book/course gs gs128 Java. It can also be found in gs gs128 Java Operators Control Statements - Java Assignment Operators and Operator Precedence - Quiz No.1.
Which of these lines of Java code will give better performance?
1. a | 4 + c >> b & 7; 2. (a | ((( 4 * c ) >> b ) & 7 ))
1 will give better performance as it has no parentheses
2 will give better performance as it has parentheses
Both 1 & 2 will give equal performance
Dependent on the computer system