Hello Parvin,

Google for sorting algorithms ... Quicksort,Bubblesort etc will do the
trick.

~Gagan
On Jan 22, 2011 10:52 AM, "Parveen Thakur" <parveenkumar...@gmail.com>
wrote:
> HI All,
>
> How i can sort the array list without use of sort () method in
> the following example in java:
>
> import java.util.Arrays;
>
>
>
> public class JavaSortStringArray
>
> {
>
> public static void main(String[] args)
>
> {
>
> // create a String array
>
> String[] fruits = {"banana", "orange", "kiwi", "apple"};
>
>
>
> // sort the array, using the sort method of the Arrays class
>
> Arrays.*sort*(fruits);
>
>
>
> // print the sorted results
>
> for (String fruit : fruits)
>
> {
>
> System.out.println(fruit);
>
> }
>
> }
>
> }
>
> --
> To post to this group, send email to
javaprogrammingwithpassion@googlegroups.com
> To unsubscribe from this group, send email to
javaprogrammingwithpassion+unsubscr...@googlegroups.com<javaprogrammingwithpassion%2bunsubscr...@googlegroups.com>
> For more options, visit this group at
http://groups.google.com/group/javaprogrammingwithpassion?hl=en

-- 
To post to this group, send email to javaprogrammingwithpassion@googlegroups.com
To unsubscribe from this group, send email to 
javaprogrammingwithpassion+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/javaprogrammingwithpassion?hl=en

Reply via email to