I am writing a code to insert a new word in the dictionary file(given).
I was adding the new word in the ArrayList and then sorting the array to keep a sorted dictionary by collection.sort(ArrayList<E> e)
but it is not full-filling my requirement as my dictionary is
A
a
aa
aab
.
.
.
but when I sort it all caps are listed above then all small letter words like
A
Aaina
Aab
.
.
.
a
aa
aab
Can you help me in inserting words without changing the order?