wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes Hi All, While working with Head first java, I got into a problem, please help me to solve this..... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Hi All, While working with Head first java, I got into a problem, please help me to solve this....." Watch "Hi All, While working with Head first java, I got into a problem, please help me to solve this....." New topic
Author

Hi All, While working with Head first java, I got into a problem, please help me to solve this.....

Mike Kris
Greenhorn

Joined: Jun 08, 2009
Posts: 9
This is the code.....
I am not able to eliminate one last error in this and i tried all possible things, Kindly help me in fixing it.....




And this is the error i have got.


D:\Java\Game>javac Game.java
Game.java:15: cannot find symbol
symbol : method setLocationCells(int[])
location: class SimpleDotCom
theDotCom.setLocationCells(locations);
^
1 error


I am working on it still, but not able to eliminate this last error.....
Please, please help me guys.........


Thanks a million
Mike
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 37936
    
  22
Look closely at the spelling of your method because the tiniest error like putting l for L or vice versa will cause problems.

And never say while (isAlive == true) . . . Never say anything == true or anything == false. It is bad style and you can get nasty errors if you write = by mistake.

It is while (isAlive) . . . or if you want it to be false, while (!isAlive) . . .
Junior Zhang
Greenhorn

Joined: Feb 01, 2008
Posts: 6
The method in class SimpleDotCom is setlocationCells(int[]).
But the method used in class Game is setLocationCells(int[]).
It's a spelling mistake.
Mike Kris
Greenhorn

Joined: Jun 08, 2009
Posts: 9


Yeah, I got it guys....

It was a typo.....

Thanks a lot for your help....

Mike
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 37936
    
  22
You're welcome
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Hi All, While working with Head first java, I got into a problem, please help me to solve this.....
 
Similar Threads
import java.io.*; problem
HeadFirstJava - SimpleDotCom
This code of mine is not working, Please help.... i am studying from Head first java
While working from Head first java, I came across this problem... Please help
getting exception in thread "main" java.lang.NoSuchMethodError: main error message