为什么它不接受它作为一个数组并一直说它解析为Class <character>?

时间:2016-03-05 21:54:30

标签: java arrays class character resolve

我认为我试图建立的是一个非常明显的元音和元音,但这个错误让我几乎疯了。我希望有人可以解释我的错误。在此先感谢;)

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;
}

}

0 个答案:

没有答案