PLs can you help? I can t figure out what is wrong?
Pouvez vous m'aider?
package fr.codegym.task.task09.task0923;
import java.io.BufferedReader;
import java.io.InputStreamReader;
/*
Voyelles et consonnes
*/
public class Solution {
public static char[] voyelles = new char[]{'a', 'e', 'i', 'o', 'u', 'y'};
public static void main(String[] args) throws Exception {
ArrayList<Character> chaine = new ArrayList<Character>();
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String s = reader.readLine();
for (int i = 0; i < s.length(); i++){
chaine.add(s.charAt(i));}
ArrayList<Character> v = new ArrayList<Character>();
ArrayList<Character> ww = new ArrayList<Character>();
for (Char n : chaine){
if (estVoyelle(n) = true){
v.add(n);
System.out.print(v);}}
for (Char m : chaine){
if (estVoyelle(m)= false){
ww.add(m);
System.out.print(ww);
}
}
}
// La méthode vérifie si une lettre est une voyelle
public static boolean estVoyelle(char c) {
c = Character.toLowerCase(c); // Conversion en minuscules
for (char d : voyelles) // Recherche les voyelles dans le tableau
{
if (c == d)
return true;
}
return false;
}
}