As you see i have a check method defined in the class definition. The problem is that i cant compare the two characters since it doesnt let me to define char e in the class defintion. How do i fix this task? a==e is written by me for reference of what i have been doing, but i get the error message:
Syntax Error(s) tester.java:7: error: cannot find symbol if(a==e){ ^ symbol: variable e location: class tester 1 error
Thankful for any help!
public static void check (char a){ if(a==e){ System.out.println("if"); }else{ System.out.println("else"); } }
Aucun commentaire:
Enregistrer un commentaire