I have a method:
public static void MutableInt (int newValue) {
AtomicInteger atomicInteger;
atomicInteger = new AtomicInteger(10);
newValue = atomicInteger.get();
}
And then invocation in main:
int x=3;
MutableInt(x);
System.out.println("After invoking MutableInt method, x = " + x);
Result is still 3. Is it possible to mutate the int this way?