In my application am trying to format and sort the date, i am using to_char() function to format the date to my required format, but when i sort them it is sorting
If you let Oracle sort (recommended), just do it like described in Justin Cave's answer. If, for some reason, you do the sorting in Java, do not use to_char; get the dates as Date objects instead and use e.g. a SimpleDateFormat to do the formatting in Java (after sorting).