Java 22.1
Can anyone help me debug this code, please? https://www.sololearn.com/learning/1068 import java.util.Scanner; public static void main (String[] args) { Scanner sc = new Scanner (system.in) int size = sc.nextInt(); // State the length of the array. int[] nums = new int[size]; // Set the length of the array nums to the var size. int sum = 0; for (int i = 0; i < size; i++) { nums[i] = sc.nextInt(); if (i % 4 == 0) { sum += nums[i]; } }System.out.println(sum); sc.close(); } } I have put this code in Eclipse and debugged it. For some reason, it is missing 16 but including 7 in the first test so outputting 11 and missing 4 but including 32 in the second test so outputting 32. Does anyone have any ideas where I've gone wrong?