944,216 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 4337
  • Java RSS
Jun 13th, 2006
0

Java Scanner problem please help

Expand Post »
Hi im new to java and i just started my summer homework with jcreator. Well my teacher told us to do this code and i tried it on my friends computer and it worked fine.Well now im at home and every time i try to run the program I get "Cannot resolve symbol class Scanner"
Does any one know how to fix this
Thanks

import java.util.Scanner;
public class lab3
{
public static void main (String args[])
{
Scanner in = new Scanner(System.in);

long x;
long y;

System.out.println("please enter a positive whole number below 1000 ");
x=in.nextLong();

y=x;
x=x+3;
x=x*2;
x=x-4;
x=x/2;
x=x-y;

System.out.println("Your number is "+x+" and your original number is "+y);




}
}
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
skinnybones is offline Offline
1 posts
since Jun 2006
Jun 13th, 2006
0

Re: Java Scanner problem please help

You need to use the latest java development kit for the scanner utility class.
Featured Poster
Reputation Points: 1536
Solved Threads: 431
Posting Expert
iamthwee is offline Offline
5,865 posts
since Aug 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: swings,aplet,jsp example
Next Thread in Java Forum Timeline: helpp





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC