Identifier expected

+2 Arnab Banerjee · January 24, 2015
import java.util.*;
static int grade;
public class{
public static void main(String args[]){
System.out.println(" Enter your grade ");
Scanner input = new Scanner(System.in);
grade = input.nextInt();

switch(grade){
case 9:
System.out.println("Out standing");
break;
case 8:
System.out.println("Excellent");
break;
case 7:
System.out.println("Very good");
break;
case 6:
System.out.println("Good");
break;
case 5:
System.out.println("Satisfactory");
break;
default:
System.out.println("Failed");

}
}
}

What's wrong in this code ? :P 

Post a Reply

Replies

- page 2
Oldest  Newest  Rating
+1 Arnab Banerjee · January 24, 2015
:P :P 
+1 Mr. Computer · January 24, 2015
import java.util.*;

public class apples{
public static void main(String args[]){
int grade;
System.out.println(" Enter your grade ");
Scanner input = new Scanner(System.in);
grade = input.nextInt();

switch(grade){
case 9:
System.out.println("Out standing");
break;
case 8:
System.out.println("Excellent");
break;
case 7:
System.out.println("Very good");
break;
case 6:
System.out.println("Good");
break;
case 5:
System.out.println("Satisfactory");
break;
default:
System.out.println("Failed");

}
}
}






Worked for me :D i got 10 but failed ! Aahah
  • 1
  • 2

Java / Android Development

107,021 followers
About

Very popular language used to create desktop applications, website applets, and Android apps.

Links
Moderators
Bucky Roberts Administrator