In the K&B example of Arrays.sort(ArrayTosort,Comparator) [Page 577 of SCJP 1.6 book, Chapter no. 7 same as in SCJP 1.5 book]
what value does ReSortComaprator classes object rs take when its declared by
rs = new ReSortComparator().
Its used with Arrays.sort( ), what role does the comparator play here??
The comparator executes the sort logic that you define.
As the sort method goes through your Array, it compares two objects using your Comparator instance. Depending on the result, the objects are shifted or not. This generates the sorted Array.
JDBCSupport - An easy to use, light-weight JDBC framework -