Given:
3. public class Main { 4. static int myValue = 7; 5. public static void main(String[] args) { 6. new Main().go(myValue); 7. System.out.print(" " + myValue); 8. } /*from w w w . j a v a2 s . co m*/ 9. void go(int myValue) { 10. myValue++; 11. for(int myValue = 3; myValue < 6; myValue++) 12. ; 13. System.out.print(" " + myValue); 14. } 15. }
What is the result?
E is correct.
The parameter declared on line 9 is valid.
The variable name myValue cannot be declared again on line 11 in the same scope as the declaration on line 9.