Check out example codes for "java manipulate alphabet list". It will help you in understanding the concepts better.

Code Example 1

for (int i = 'A'; i <= 'Z'; i++)
    for (fileName: fileNameList) {
        if ((int)fileName.charAt(0) == i) {
            AlphabetList.add((char)i);
        }
    }
}

Code Example 2

String alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";int indexOfLetterD = alphabet.indexOf("D");//indexOfLetterD equals 3

Code Example 3

String usernameInDatabase = "modernNerd";String passwordInDatabase = "mN123Java";String providedUsername = "modernnerd";String providedPassword = "mN123Java";if(providedUsername.equalsIgnoreCase(usernameInDatabase)){    //successful username comparison    //check the provided password    //this will fail    //if("mn123java".equals(passwordInDatabase)){}        //this will pass    if(providedPassword.equals(passwordInDatabase)){        System.out.println("Success! You are logged in.");    } else {        System.out.println("Wrong password. Try again.");    }} else {    //user provided wrong username    System.out.println("Wrong username. Try again.");}

Code Example 4

String middle3 = (string.length < 3) ? null : string.substring(string.length / 2 - 1), string.length / 2 + 2);

Code Example 5

String middle3 = (string.length() < 3) ? null : 
              string.substring(string.length() / 2 - 1, string.length() / 2 + 2);

Learn ReactJs, React Native from akashmittal.com