Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Help with arrays

807599Mar 27 2007 — edited Mar 27 2007
I would like some help with a question on arrays

I am supposed to find the mean and the mode of a 2 D array

I created a nested for loop the totaled the array = that to int total

and then I set int average = total / array.length, and it is not correctly averaging the array,

my professor said that array.length won't work for a 2D array only a single array. she suggested a counter but I am not sure on how to code this?

Can someone help me please?

I have no idea on how to find the mode.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 24 2007
Added on Mar 27 2007
19 comments
73 views