Java Scanner problem please help

Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Jun 2006
Posts: 1
Reputation: skinnybones is an unknown quantity at this point 
Solved Threads: 0
skinnybones skinnybones is offline Offline
Newbie Poster

Java Scanner problem please help

 
0
  #1
Jun 13th, 2006
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);




}
}
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 5,273
Reputation: iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold 
Solved Threads: 378
Featured Poster
iamthwee's Avatar
iamthwee iamthwee is offline Offline
Posting Expert

Re: Java Scanner problem please help

 
0
  #2
Jun 13th, 2006
You need to use the latest java development kit for the scanner utility class.
*Voted best profile in the world*
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Java Forum
Thread Tools Search this Thread



Tag cloud for Java
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC