Finding Median in array

How can I find median number in an array?Example:If array consist of 5, 3, 6, 7,4then median will be 5 how can I do it?Thanks
[160 byte] By [JohnSmith1a] at [2007-10-2 7:08:34]
# 1
> How can I find median number in an array?Sort the array, select the middle element.
yawmarka at 2007-7-16 20:40:58 > top of Java-index,Java Essentials,New To Java...
# 2
An exaple will help
JohnSmith1a at 2007-7-16 20:40:58 > top of Java-index,Java Essentials,New To Java...
# 3
http://javaalmanac.com/egs/java.util/coll_SortArray.htmljavaalmanac.com has dozens of other examples, too -- well worth bookmarking
jsalonena at 2007-7-16 20:40:58 > top of Java-index,Java Essentials,New To Java...
# 4
> An exaple will help http://www.mathsisfun.com/median.html
prometheuzza at 2007-7-16 20:40:58 > top of Java-index,Java Essentials,New To Java...
# 5
> An exaple will helpSo will some effort.
yawmarka at 2007-7-16 20:40:58 > top of Java-index,Java Essentials,New To Java...
# 6

> > An exaple will help

>

> So will some effort.

Now, before you fly off the handle about "newbie persecution" or some other ridiculous tangent about how you're not getting help around here, consider the following:

You obviously have internet access. Google for "java array sort" and "java array tutorial". You'll find more examples than you can shake a stick at. Don't expect to be spoon-fed answers. I trust your abilities to work toward a solution. If/when you run into a snag, post a [url=http://www.physci.org/codes/sscce.jsp]short, concise, executable example[/url] of what you're trying to do. Post your code between [code] and [/code] tags. Cut and paste the code, rather than re-typing it (re-typing often introduces subtle errors that make your problem difficult to troubleshoot). Please preview your post when posting code.

We'll be happy to help, but there's no sense repeating tutorial information when it's so readily available.

Good luck!

yawmarka at 2007-7-16 20:40:58 > top of Java-index,Java Essentials,New To Java...
# 7
Here is a [url= http://www.csl.mtu.edu/cs2321/www/newLectures/Iterators_and_Insertion_Sort.html]link for an inplace insertion sort algorithm[/url].It took me more time to write this message than it took to find the link.
filestreama at 2007-7-16 20:40:58 > top of Java-index,Java Essentials,New To Java...