• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Simple Dot Com Game

 
Spandan Pandey
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Spandan Pandey
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic