public class SameVarName { public static void main(String[] args) { int x; x = 4; // CHANGES the value in x to 4 System.out.println(x); increment(x); // PASS x to method "increment" System.out.println(x); // x UNCHANGED ! Why?? } public static void increment(int x ) // x and main's x are different variables !! { x = x + 1; } }