Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Linux Archive
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-19-2007, 09:11 AM
Member
 
Join Date: Dec 2007
Posts: 1
pascal45 is on a distinguished road
Regarding Scanner Object -- Cannot Resolve the Symbol
Hi,

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.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 12-21-2007, 01:12 PM
CaptainMorgan's Avatar
Moderator
 
Join Date: Dec 2007
Location: NewEngland, US
Posts: 841
CaptainMorgan will become famous soon enoughCaptainMorgan will become famous soon enough
Send a message via AIM to CaptainMorgan
Are you sure you don't mean CourseGradeBookTest instead of CourseGradeBook ?

And for now, since I'm not sure what you're trying to completely do, I commented out the line:
Code:
CGB.displayMessage(NameofCourse);
and as a result it compiled and ran. Or you can make your own display() or find one.

-Capt
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error: cannot resolve symbol' on Person (java.lang.String, java.lang.String) baltimore New To Java 2 09-18-2008 09:30 AM
myfaces.apache.org/extensions can't resolve Heather JavaServer Faces 3 06-26-2008 11:23 PM
Cannot Resolve Symbol error... seral1969 New To Java 4 02-18-2008 02:17 AM
Error: cannot resolve symbol, help me mathias Enterprise JavaBeans 1 08-06-2007 04:46 PM
MySite/Valid.java:56: cannot resolve symbol Albert Enterprise JavaBeans 1 07-05-2007 07:49 AM


All times are GMT +3. The time now is 04:42 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org