hello java programmers out there im new here and also new to java. I just started java programming lately and I find it really tough yet challenging. And I'm trying really hard to get the hang of java, so I hope you pros out there could help me improve.
ok here's my question.
Im trying to sum up all elements in an array so i can find its average.
For example this code:
int[] testResults = {80, 82, 62, 49, 16, 18};
How do I sum up all the elements in that array? And how do I find its average?
Can anyone give me an example of the code and some explanation. Thanks