Question: I'm trying to create a simple "english to leet" converter but I have no idea what method to use in order to convert the string to leet.

And for some reason I can't use equalsIgnoreCase when I have the strings english[] and leet[] 

```
    public static void main(String[] args) {
    String english[] = {"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"};
    String leet[] = {"4", "8", "(", ")", "3", "}", "6", "#", "!", "]", "X", "|", "M,", "N", "0", "9", "Q", "2", "Z", "7", "M", "V", "W", "X", "J", "Z"};
    String result = "";

    Scanner sc = new Scanner(System.in);
    String Str = sc.nextLine();

    for (int i = 0 ; i < english.length ; i++) {    

        if (Str.equalsIgnoreCase(english)) {
        // convert to leet
        }
    }
}

```

}

Answer: 
Since array english just lists "A" to "Z" in order, you do even need to loop through the english array, just do:

```
Scanner sc = new Scanner(System.in);
    String Str = sc.nextLine().toUpperCase(); // convert all to upper case so that you don't need equalsIgnoreCase()
    for (int i = 0; i < Str.length(); ++i) {
        result +=leet[Str.charAt(i) - 'A']; // Str.charAt(i) - 'A' this will give you the correct index in leet
    }

```
It requires two for loops, and you should use a character array instead of a String array for better practice.

Here is the solution:

```
char english[] = {'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'};
char leet[] = {'4', '8', '(', ')', '3', '}', '6', '#', '!', ']', 'X', '|', 'M', 'N', '0', '9', 'Q', '2', 'Z', '7', 'M', 'V', 'W', 'X', 'J', 'Z'};
String result = "";

Scanner sc = new Scanner(System.in);
String Str = sc.nextLine();//SHIVAM
for (int i = 0 ; i < Str.length() ; i++) {    

    char tmp = Str.charAt(i);
    for(int j = 0 ; j < english.length ; j++){
        if(tmp==english[j])
            result += leet[j];
    }
}
System.out.println(result);//Z#!V4M

```