Hi all,
I noticed a strange behavior (for me) when sorting a list retrieved with Arrays.asList()
. It seems that after Collections.sort( list )
, the origin array is also sorted !
How is it possible ?
List<Rate> rates = Arrays.asList( arrayRates );
Collections.sort( rates, new RateEffectiveDateComparator() );
/* after that the rates list AND arrayRates array are sorted in the same way */