i have to calculate the MEDIAN of an unsorted array(i.e,array must be in sorted order before calculation of median).I am a beginner in java.kindly help me with some kinda code,and learn me how to calculate the median in this case?thankx
software girl
0
Newbie Poster
Recommended Answers
Jump to PostRead the API doc for Arrays class, sort() method. We don't write people's homework for them, but make an effort and someone will help.
Jump to PostAs far as I know you have to sort the numbers then take the middle one.
The Arrays class has sort methods to make this really easy for you - see the API doc
All 8 Replies
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
software girl
0
Newbie Poster
software girl
0
Newbie Poster
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
software girl
0
Newbie Poster
software girl
0
Newbie Poster
software girl
0
Newbie Poster
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.