vailable consonants might not have been initialized:
im not sure how to solve this as im new in java and have not seen this error message before
here is the program:
public class Instructor
{
public static void main (String[] args)
{
}
public void congratdulateStudent(char grade)
{
switch(grade) {
case 'a': case 'b': case 'c': case 'd': case 'e':
int vowels = vowels + 1;
break;
default:
int consonants = consonants + 1;
char grade1 = 'e';
switch(grade1) {
case 'a':
System.out.println("Excellent");
break;
case 'b':
System.out.println("Nice job");
break;
case 'c':
System.out.println("Not bad");
break;
case 'd':
System.out.println("almost!" +"See you next semester");
break;
case 'e':
System.out.println("See you next semester");
break;
}
}
}
}

New Topic/Question
Reply



MultiQuote





|