This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
Before Sorting 3 2 4 1 After Sort By Comparable 4 3 2 1 After Sort By Comparator 1 2 3 4
Only doubt i have in above code is that how i can create instance of inner class(MyComparator)at line 15 without creating instance of outer class(SortTest) class.Because MyComparator is inner class at line 38.