This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma 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.