Results 1 to 4 of 4
  1. #1
    batista11b5 is offline Member
    Join Date
    Oct 2010
    Posts
    23
    Rep Power
    0

    Default Can not compile code , anyone help me fix it ?

    when I compile it .

    Java Code:
    import java.util.Scanner;
    public class guessing{
    	public static void main (String[]args){
    
    		int guessing;
    		int hiddenNum = (int) (Math.random()*11);
    		int numguess;
    
    		Scanner kbd = new Scanner (System.in);
    
    		System.out.println ("Enter a number bt 0&10");
    		guessing = kbd.nextInt();
    		numguess++;
    
    		while ((guessing != hiddenNum) && (numguess <=3)){
    
    			if (guessing < hiddenNum){
    				System.out.println ("u guess too low");
    			}else if (guessing > hiddenNum){
    				System.out.println ("u guess too high");
    			}
    			System.out.println ("guess again");
    			guessing = kbd.nextInt();
    			numguess++;
    		}
    
    		if	(guessing == hiddenNum){
    				System.out.println ("u guess correctly");
    				System.out.println ("It took you "+numguess+ " times guessing");
    		} else {
    				Systen.out.println ("sorry , u guess too much times");
    			}
    			System.out.println ("End of processing");
    
    	}
    }

    It's show like that


    Java Code:
    C:\Users\k3107q\Desktop\formular program\JAVA folder\guessing.java:31: package Systen does not exist
    				Systen.out.println ("sorry , u guess too much times");
    				      ^
    1 error
    
    Tool completed with exit code 1

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

  3. #3
    goldest's Avatar
    goldest is offline Senior Member
    Join Date
    Oct 2009
    Location
    Pune, India
    Posts
    469
    Rep Power
    5

    Default

    This is absolutely simple thing to find out. We would like you figure that out.

    As Fubarable suggested, have a closer look. In short, I would suggest you to use some good tool like Eclipse which would minimize any such small mistakes.

    Goldest

  4. #4
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,524
    Blog Entries
    7
    Rep Power
    20

    Default

    My guess is that the OP lives in a Spanish speaking country; they often swap the 'n' for a trailing 'm' in foreign words, e.g. "Amsterdan" ... probably both spellings sound the same in Spanish.

    kind regards,

    Jos

Similar Threads

  1. Online IDE to edit and compile code?
    By DarrenReeder in forum Other IDEs
    Replies: 1
    Last Post: 02-06-2011, 01:58 AM
  2. Java Code Won't Compile
    By JavaStudent1990 in forum New To Java
    Replies: 4
    Last Post: 07-29-2010, 09:34 AM
  3. Code does not Compile
    By ustar in forum New To Java
    Replies: 13
    Last Post: 03-06-2010, 04:54 PM
  4. New to JAVA and code cant compile
    By Gayethiri_86 in forum New To Java
    Replies: 2
    Last Post: 03-05-2010, 06:43 AM
  5. Code will not compile
    By ShotGunRockets in forum New To Java
    Replies: 17
    Last Post: 05-10-2009, 03:31 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
  •