Comment trouver un caractère spécifique dans une chaîne à l'aide d'un tableau

    public static void main(String[] args) {
        String url = "[email protected]";
        char key = '@';

        char[] ch = url.toCharArray();

        for (int i = 0; i < ch.length; i++) {
            if (key == ch[i]) {
                System.out.println(key + " is in index: "+i);
            }
        }
    }
Chathumal Sangeeth