Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The code works but after i submitted to the AutoLab System the system tells me that i am wrong !!! Here is the message :

The code works but after i submitted to the AutoLab System the system tells me that i am wrong !!! Here is the message : "takes an ArrayList of Integers as a parameter and returns an int. The returned int should be the sum of the values int the input ArrayList at indices 4, 20, 7, 8, and 10. You can assume the input ArrayList has size large enough to avoid an index out of bounds exception at these indices +0 Could not find a method named q1 with parameter list (ArrayList)" Please Help me. Thank you.

image text in transcribed

*q1: Write a public static method named q1 that takes an ArrayList of Integers as a parameter and returns an int. The returned int should be the sum of the values int the *input ArrayList at indices 4, 20, 7, 8, and 10. You can assume the input ArrayList has * size large enough to avoid an index out of bounds exception at these indices public static int q1(ArrayList

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions