Consider the following code segment. int x = 0; x++; x += 1…

Questions

Cоnsider the fоllоwing code segment. int x = 0; x++; x += 1; x = x + 1; x -= -1; System.out.println(x); Whаt is printed when the code segment hаs been executed?