我认为我试图建立的是一个非常明显的元音和元音,但这个错误让我几乎疯了。我希望有人可以解释我的错误。在此先感谢;)
public static int dez = 97;
public char[] setConsonantArray(){
char[] consonant = new char[21];
int indexCounter = 0;
for(int i = 0; i>27; i++){
if(dez != 97 && dez != 101 && dez != 105 && dez != 111 && dez !=117){
char[indexCounter] = (char) dez;
indexCounter++;
}else{
}
dez++;
}
return consonant;
}
public char[] setVowelArray(){
char[] vowel = new char[5];
int indexCounter = 0;
for(int i = 0; i>27; i++){
if(dez == 97 || dez == 101 || dez == 105 || dez == 111 || dez ==117){
char[indexCounter] = (char) dez;
indexCounter++;
}else{}
dez++;
}
return vowel;
}
}