| | |
Java Scanner problem please help
Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Jun 2006
Posts: 1
Reputation:
Solved Threads: 0
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
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
- scanner problem or software problem (Apple Hardware)
- Java GUI problem... contents of JFrame is invisible... (Java)
- basic java GUI problem (Java)
- XP SP2 - R80 scanner problem (Windows NT / 2000 / XP)
- java chat problem (Windows 95 / 98 / Me)
Other Threads in the Java Forum
- Previous Thread: swings,aplet,jsp example
- Next Thread: helpp
| Thread Tools | Search this Thread |
Tag cloud for Java
affinetransform android api append apple applet application arguments array arrays automation bi binary bluetooth busy_handler(null) chat class classes client code component database desktop draw eclipse encryption equation error event exception fractal game givemetehcodez graphics gui html ide image input integer intersect j2me java javaexcel javaprojects jmf jni jpanel julia linked linux list loop main map method methods mobile netbeans newbie number open-source oracle oriented panel print problem program programming project properties qt recursion reference replaysolutions repositories return robot scanner screen scrollbar se server set singleton size sms socket sort sql string swing test threads time tree utility windows xor xstream






