0 votes
in JAVA by

What will be the output of the following Java program?

class Output

{

public static void main(String args[])

{

int p = 1;

int q = 2;

int r = 3;

p |= 4;

q >>= 1;

r <<= 1;

p ^= r;

System.out.println(q + ” ” + q + ” ” + r);

}

}

1) 3 3 6

2) 2 3 4

3) 2 2 3

4) 3 1 6

1 Answer

0 votes
by
4) 3 1 6

Related questions

0 votes
asked Apr 9, 2021 in JAVA by Robindeniel
0 votes
asked May 3, 2021 in JAVA by Robindeniel
...