✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
Observe el siguiente segmento de código escrito en Java:
int[] numeros = {2, 4, 6, 8, 10};int suma = 0;for(int i = 0; i <= numeros.length; i++) { if(i % 2 == 0) { suma += numeros[i]; }}System.out.println("Suma: " + suma);
El código anterior, ¿está bien escrito o posee algún error?
Si contiene error, identifíquelo y explique por qué ocurre.
¿Cuál sería la forma correcta de escribirlo?
Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!