I heard that Java integers are pass by value, so why does the following code work in code.runnable.com?
public class HelloWorld {
public static void main(String[] args) {
int number = 0;
number = 2;
System.out.println(number);
}
}
The code will print out 2.