Results 1 to 3 of 3
  1. #1
    Guilbertda is offline Member
    Join Date
    Feb 2010
    Posts
    1
    Rep Power
    0

    Default 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:

  2. #2
    jforce93 is offline Member
    Join Date
    Aug 2009
    Posts
    24
    Rep Power
    0

    Default

    well, you should have public static void main(String [] args) and I believe that scanner should be Scanner

  3. #3
    Lil_Aziz1's Avatar
    Lil_Aziz1 is offline Senior Member
    Join Date
    Dec 2009
    Location
    United States
    Posts
    343
    Rep Power
    5

    Default

    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++;
    		}
    	}
    }
    All I did was make "scanner" into Scanner" and "system.out" to "System.out"
    "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

  1. Total noob
    By J_Walker in forum New To Java
    Replies: 9
    Last Post: 04-24-2009, 03:10 AM
  2. Help im a noob.. a super noob on java..
    By critdevil in forum New To Java
    Replies: 12
    Last Post: 03-07-2009, 03:17 AM
  3. Noob
    By nokomis in forum Introductions
    Replies: 2
    Last Post: 03-06-2009, 05:10 PM
  4. Big time NOOB
    By enigmaymee in forum New To Java
    Replies: 7
    Last Post: 01-14-2009, 06:11 PM
  5. Please help a noob :)
    By Bays in forum New To Java
    Replies: 15
    Last Post: 06-17-2008, 06:11 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •