Skip to content

This is Comparator for sorting words in Azerbaijani language in ascending lexicographic order.

License

Notifications You must be signed in to change notification settings

sisgandarli/azerbaijani-words-comparator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 

Repository files navigation

AzerbaijaniWordsComparator

About

This is a comparator for sorting words in Azerbaijani language in ascending lexicographic order using Java programming language.

Usage

The idea is very simple! Imagine that you created an array of String objects which are only in Azerbaijani language, for example,

String[] words = {"Şahnur", "Bədəl", "Akif", "Murad", "Namiq", "Mələk", "Arzu"};

Then you want to sort the words using a sort method from a standard library which accepts an array of String objects and a comparator as arguments.

Arrays.sort(words, new AzerbaijaniWordsComparator());

P.S.: This comparator can be used for sorting not only arrays of String objects, but also for sorting ArrayLists, Linkedlists, and other collections of String objects, too!

We will see the output below when we print the elements of array using a loop:

for (String i : words) 
        System.out.println(i);
Output:
Akif
Arzu
Bədəl
Mələk
Murad
Namiq
Şahnur

About

This is Comparator for sorting words in Azerbaijani language in ascending lexicographic order.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages