Computers

10th -

12thgrade

Image

Arrays

517
plays

10 questions

Show Answers
See Preview
  • 1. Multiple Choice
    2 minutes
    1 pt
    What does the following segment of code print out? int[] numArray = { 2, 7, 4, 12, 0, 2 };
    System.out.println("Number: " + numArray[2]);
    Number: 2
    Number: 7
    Number: 4
    Number: 12
  • 2. Multiple Choice
    2 minutes
    1 pt
    What does the following segment of code print out? int[] numArray = { 2, 7, 4, 12, 0, 2 };
    System.out.println("Number: " + numArray[0]);
    Number: 2
    Number: 7
    Number: 4
    Number: 12
  • 3. Multiple Choice
    2 minutes
    1 pt
    What does the following segment of code print out? int[] numArray = { 2, 7, 4, 12, 0, 2 };
    System.out.println("Number: " + numArray[numArray.length - 1]);
    Number: 2
    Number: 0
    Number: 12
    Number: 6
  • Answer choices
    Tags
    Answer choices
    Tags

    Explore all questions with a free account

    Already have an account?