Hi ,
Can you all help me in my preparation .
Arrays
------
1] public static
String toString(Object[] o)
this method returns all the elements in String format . enclosed by [] & has , between elements .
2] public static void sort(Object[] o)
this method sort the array .
int[] i = {6,3,7,4};
System.out.println(Arrays.toString(i));
i = Arrays.sort(i);
System.out.println(Arrays.toString(i));
output :
[6, 3, 7, 4]
[3, 4, 6, 7]
Is this right ? Can you add something more into this ...
My doubt is :
public static void sort(Object[] o)
it will sort object array based on natural ordering . what is this
natural ordering ? can any body explain me with example .
thank you very much .
[ January 31, 2005: Message edited by: rathi ji ]