Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Beginning Java and the fly likes Simple Dot Com Game Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Simple Dot Com Game" Watch "Simple Dot Com Game" New topic
Author

Simple Dot Com Game

Spandan Pandey
Greenhorn

Joined: Feb 20, 2013
Posts: 10
Hi Guys!!I need a serious help..I have stuck on this chapter for couple of days and now the program doesn't run.The javac compiler is showing this error at the command prompt:
SimpleDotCom.java:57:class,interface or enum expected
import java.io.*;
^
1 error


Here is my code:



Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41629
    
  55
Import statements must be at the beginning of a source file, not somewhere in the middle. Also note that Java is case-sensitive - there are a few compilation errors where you mixed up uppercase and lowercase.


Ping & DNS - my free Android networking tools app
Spandan Pandey
Greenhorn

Joined: Feb 20, 2013
Posts: 10
Ulf Dittmer wrote:Import statement must be at the beginning of a source file, not somewhere in the middle of it. Also note that Java is case-sensitive - there are a few compilation errors where you mixed up upper- and lowercase.


Thanks Ulf!!
It runs now!!I put the gamehelper at the beginning,corrected the UpperCase and LowerCase errors and now it runs alright!!
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Simple Dot Com Game