Menu
Question Index
...

What will be the output of the following program?

class Addition
{
    public static void main(String s[])
    {
        int a = 4;
        a++;
        a += a;
        --a;
        a = 7 + a;
        a *= a;
        a -= 3;

        System.out.println(" a = " + a );
    }
}


Program does not compile
a = 255
a = 253
a = 286

Doubts

Problems

Topic: Arithmetic Compound Assignment Operators In Java

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App