Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Here's an example:

Code Block
languagejava
import java.util.Arrays;
static void modifyArray(int[] arr) {
    arr[0] = 99;
    System.out.println("Array inside method: " + Arrays.toString(arr));
}

public static void main(String[] args) {
    int[] myArray = {1, 2, 3};
    modifyArray(myArray);
    System.out.println("Array outside method: " + Arrays.toString(myArray));
}

...