Operators

© examsiri.com
Question : 2 of 23
 
Marks: +1, -0
Given the command line java Pass2 and:
1. public class Pass2 {
2.   public void main(String [] args) {
3.    int x = 6;
4.    Pass2 p = new Pass2();
5.    p.doStuff(x);
6.    System.out.print(" main x = " + x);
7.   }
8.
9.   void doStuff(int x) {
10.    System.out.print(" doStuff x = " + x++);
11.   }
12. }

What is the result?
Go to Question: