Right now I\'m doing
for (char c = \'a\'; c <= \'z\'; c++) { alphabet[c - \'a\'] = c; }
but is there a better way to do it? Similar
This is a fun Unicode solution.
char[] alpha = new char[26] for(int i = 0; i < 26; i++){ alpha[i] = (char)(97 + i) }
This generates a lower-cased version of alphabet, if you want upper-cased, you can replace '97' with '65'.
Hope this helps.