This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
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 Java 8 in Action this week in the Java 8 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: 39576
    
  27
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 - updated with new look and Ping home screen widget
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!!
 
Consider Paul's rocket mass heater.
 
subject: Simple Dot Com Game
 
Similar Threads
import java.io.*; problem
HFJ 2nd - Problem with SimpleDotCom
Hi All, While working with Head first java, I got into a problem, please help me to solve this.....
This code of mine is not working, Please help.... i am studying from Head first java
HeadFirstJava - SimpleDotCom