Regarding Scanner Object -- Cannot Resolve the Symbol
807603Dec 18 2007 — edited Dec 19 2007Hi,
I am new to Java, as well as this Forum.
Today I tried with Scanner object. But it shows Error.
My Code:
import java.util.Scanner;
public class CourseGradeBookTest
*{*
* public static void main(String args[])*
* {*
* Scanner input=new Scanner(System.in);*
* CourseGradeBook CGB=new CourseGradeBook();*
* System.out.println("Course Grade Book");*
* String NameofCourse=input.nextLine();*
* System.out.println();*
* CGB.displayMessage(NameofCourse);*
* }*
*}*
Errors:
CourseGradeBookTest.java:1: cannot resolve symbol
symbol : class Scanner
location: package util
import java.util.Scanner;
*^*
CourseGradeBookTest.java:7: cannot resolve symbol
symbol : class Scanner
location: class CourseGradeBookTest
Scanner input=new Scanner(System.in);
*^*
CourseGradeBookTest.java:7: cannot resolve symbol
symbol : class Scanner
location: class CourseGradeBookTest
Scanner input=new Scanner(System.in);
*^*
*3 errors*
I went through the Previous Questions which were related to My Question. I checked with My Java Version..its java version "1.6.0_02"
Can You please help Me to get out of this problem.
Regards
Rajan.