Please enable JavaScript to use CodeHS

Want to receive Question of the Day updates? Subscribe Here

AP CSA Question of the Day Jan. 15, 2025

Reference
  1. Incorrect Correct No Answer was selected Invalid Answer

    Given the following values of arr and the mystery method, what will the values of arr be after you execute: mystery()?

    private int[] arr = {1, 2, 3, 4, 5};
    Java
    public void mystery()
    {
        for (int number : arr) {
            number *= 2;
        }
    }
    Java