Here is a simple sorting program of an ArrayList:
ArrayList list = new ArrayList();
list.add(\"1_Update\");
list.add(\"11_Add\")
The Collections.sort() method's docs says:
Sorts the specified list into ascending order, according to the natural ordering of its elements.
Which means for Strings that you are going to get the list in alphabetic order. The String 11_assign_privileges.sql comes before the string 1_create_table.sql and 12_07_insert_static_data.sql comes before 1_create_table.sql etc. So the program is working as expected.