1String alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";int indexOfLetterD = alphabet.indexOf("D");//indexOfLetterD equals 3
1String middle3 = (string.length() < 3) ? null :
2 string.substring(string.length() / 2 - 1, string.length() / 2 + 2);
1String middle3 = (string.length < 3) ? null : string.substring(string.length / 2 - 1), string.length / 2 + 2);
1for (int i = 'A'; i <= 'Z'; i++)
2 for (fileName: fileNameList) {
3 if ((int)fileName.charAt(0) == i) {
4 AlphabetList.add((char)i);
5 }
6 }
7}