• Java Arrays Quiz Form

    Test your knowledge of Java arrays. Answer all questions to the best of your ability. All questions are required.
  • 1. Which of the following is the correct way to declare an array of integers in Java?*
  • 2. What is the default value of an int array element in Java?*
  • 3. How do you determine the number of elements in an array named 'numbers'?*
  • 4. What will be the output of the following code? int[] arr = {1, 2, 3}; System.out.println(arr[1]);*
  • 5. Which statement creates an array of 5 doubles?*
  • 6. What happens if you try to access arr[10] in an array declared as int[] arr = new int[5];?*
  • 7. Which of the following is NOT a valid way to initialize an array?*
  • 9. What is the index of the last element in an array of length 7?*
  • Should be Empty:
Select theme: