The solution for Q_04_25 is incorrect. The code gives wrong output for: first City = Chicago second City = Los Angeles third City = Atlanta Correct Logic: ``` if ( first.compareTo(second) > 0) { temp = first; first = second; second = temp; } if( first.compareTo(third) > 0) { temp = first; first = third; third = temp; } if( second.compareTo(third) > 0 ) { temp = second; second = third; third = temp; } ```
Activity
[-]Solution for Q_04_25 is wrong[/-][+]Solution for Q_04_24 is wrong[/+]