Results 1 to 3 of 3
Thread: Very noob, but need help!!!
- 02-01-2010, 10:37 AM #1
Member
- Join Date
- Feb 2010
- Posts
- 1
- Rep Power
- 0
Very noob, but need help!!!
Hey, sorry about this but i've only started writing with java today and my first program failed.
This wouldn't be a problem, except i can't figure out whats gone wrong :S.
Please help? :)
Code:
import static java.lang.system.out;
import java.util.scanner;
class Multiplier {
public static void main(String args[]) {
scanner myScanner = new scanner(system.in);
out.print("Enter a number to get it's multiples to 100");
int inputNumber = myScanner.nextInt();
int x = 1;
while (x <= 100) {
out.println();
out.print(inputNumber);
out.print(" x ");
out.print(x);
out.print(" = ");
out.println(x*inputNumber);
x++;
}
}
}
and compiling returns this:
javac: file not found: C:\Program Files\Xinox Software\JCreatorV4LE\MyProjects\Multiplier\src\Mu ltiplier.java
Usage: javac <options> <source files>
use -help for a list of possible options
Process completed.
thanks :S :eek:
- 02-01-2010, 04:59 PM #2
Member
- Join Date
- Aug 2009
- Posts
- 24
- Rep Power
- 0
well, you should have public static void main(String [] args) and I believe that scanner should be Scanner
- 02-01-2010, 10:32 PM #3
All I did was make "scanner" into Scanner" and "system.out" to "System.out"Java Code:import static java.lang.System.out; import java.util.Scanner; class Multiplier { public static void main(String args[]) { Scanner myScanner = new Scanner(System.in); out.print("Enter a number to get it's multiples to 100"); int inputNumber = myScanner.nextInt(); int x = 0; while (x <= 100) { out.println(); out.print(inputNumber); out.print(" x "); out.print(x); out.print(" = "); out.println(x*inputNumber); x++; } } }"Experience is what you get when you don't get what you want" (Dan Stanford)
"Rise and rise again until lambs become lions" (Robin Hood)
Similar Threads
-
Total noob
By J_Walker in forum New To JavaReplies: 9Last Post: 04-24-2009, 03:10 AM -
Help im a noob.. a super noob on java..
By critdevil in forum New To JavaReplies: 12Last Post: 03-07-2009, 03:17 AM -
Noob
By nokomis in forum IntroductionsReplies: 2Last Post: 03-06-2009, 05:10 PM -
Big time NOOB
By enigmaymee in forum New To JavaReplies: 7Last Post: 01-14-2009, 06:11 PM -
Please help a noob :)
By Bays in forum New To JavaReplies: 15Last Post: 06-17-2008, 06:11 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks