I saw a recent post on this forum about sorting a String Array in this particular order. Basically whatever starts with A should come before B and so on. However the problem was that small "a" should be also capital "B". Which makes the sequence Aa Bb Cc Dd. The problem is I don't think normal ASCII can be used for this purpose of ordering.
Immediately after seeing the problem I thought I could extend String class and then over ride compareTo method which is in the Comparable interface in order to perform this particular comparison. Also thought of defining a static two dimensional Array with the A = 1, a = 2, B = 3 and b = 4. So based on this array I can write to compareTo method and then call array.sort() method to achieve the required output.
However when I sat to write the code I realized that String class is final and cannot be extended. I need some design advice as to how I can design the class? I can manage the coding.