Where is my mistake in these two Java-Methods using Arrays?
So I’m having trouble getting the right output. I’ve tried my best not to hardcode any values in the calculation of these two methods but it always ends up not according to the output in the solution i’ve added to the images. Here is the code: