Given:
3. public class Main { 4. int x = 3; /*from w w w. ja v a 2s .c o m*/ 5. public static void main(String[] args) { 6. new Main().go1(); 7. } 8. void go1() { 9. int x; 10. go2(++x); 11. } 12. void go2(int y) { 13. int x = ++y; 14. System.out.println(x); 15. } 16. }
What is the result?
E is correct.
In go1() the local variable x is not initialized.