Advertisements
Advertisements
प्रश्न
Assertion (A): The result of the Java expression 3 + 7/2 is 6.
Reason (R): According to the hierarchy of operators in Java, addition is done first, followed by division.
विकल्प
(A) is true and (R) is false.
(A) is false and (R) is true.
Both (A) and (R) are true and (R) is the correct explanation of (A).
Both (A) and (R) are true, but (R) is not the correct explanation of (A).
MCQ
अभिकथन और तर्क
Advertisements
उत्तर
(A) is true and (R) is false.
Explanation:
Division has higher precedence than addition, so 7/2 is evaluated first. In Java, integer division 7/2 = 3; then 3 + 3 = 6. The reason’s claim that addition is done before division is incorrect.
shaalaa.com
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
2025-2026 (March) Official Board Paper
