What is the output of the following Java code? int m = 1000; int k = 3000;…

PYQ DSSSB 2021

What is the output of the following Java code?

int m = 1000;
int k = 3000;
while (++m < --k);
System.out.println(m);
  1. A.

    Error

  2. B.

    1000

  3. C.

    2000

  4. D.

    4000

Attempted by 989 students.

Sign up free to check your answer

Sign up free

Explore the full course: Dsssb Tgt Computer Science Paper 2

Loading lesson…