Driver code
public static void main ( String [ ] args ) { ArrayList < String > arr = new ArrayList < > ( ) ; arr . add ( "25-08-1996" ) ; arr . add ( "03-08-1970" ) ; arr . add ( "09-04-1994" ) ; arr . add ( "29-08-1996" ) ; arr . add ( "14-02-1972" ) ; printDatesAscending ( arr ) ; } }