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
0 Mr. Computer · January 24, 2015
import java.util.*;
public class prog3{
public static void main(String args[])



i think the porblem is with the 

public class prog3


u have to change it with the correct name of ur main class 
0 Arnab Banerjee · January 24, 2015
Ok I am doing it. 
  • 1
  • 2

Java / Android Development

128,134 followers
About

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

Links
Moderators
Bucky Roberts Administrator