Results 1 to 4 of 4
- 10-21-2010, 04:51 AM #1
Member
- Join Date
- Oct 2010
- Posts
- 23
- Rep Power
- 0
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
-
It's telling you exactly what the problem is. Look carefully at the error message, spelling and all.
- 10-22-2010, 01:26 PM #3
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
- 10-22-2010, 02:00 PM #4
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,375
- Blog Entries
- 7
- Rep Power
- 17
Similar Threads
-
Online IDE to edit and compile code?
By DarrenReeder in forum Other IDEsReplies: 1Last Post: 02-06-2011, 01:58 AM -
Java Code Won't Compile
By JavaStudent1990 in forum New To JavaReplies: 4Last Post: 07-29-2010, 09:34 AM -
Code does not Compile
By ustar in forum New To JavaReplies: 13Last Post: 03-06-2010, 04:54 PM -
New to JAVA and code cant compile
By Gayethiri_86 in forum New To JavaReplies: 2Last Post: 03-05-2010, 06:43 AM -
Code will not compile
By ShotGunRockets in forum New To JavaReplies: 17Last Post: 05-10-2009, 03:31 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks