Menu
Question Index
...

What will be the output of the following program.

class Addition
{
    public static void main(String s[])
    {
        int a = 4;
        a -= 10;
        a = -a;
        a = 7 + a;
        System.out.println(" a = " + a );
        a %= a;
        a = a * a - 3 ;
        System.out.println(" a = " + a );
    }
}


a = 13
a = -3
a = 33
a = 163
a = 33
a = -3
Program does not compile

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