Menu
Question Index
...

What will be the output of the following program?

public class OperatorPrecedence {
    public static void main(String[] args) {
        int a = 7 * 3 + 24 / 3 - 5;
        int b = (7 * 3) + (24 / 3) - 5;
        System.out.print(a + ", " + b);
    }
}


24, 24
33, 24
33, 33
Compilation Error
Runtime Error

Doubts

Problems

Topic: Java Operator Precedence And Associativity

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App