• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

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

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Marshal
Posts: 61774
193
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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) . . .
 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Yeah, I got it guys....

It was a typo.....

Thanks a lot for your help....

Mike
 
Campbell Ritchie
Marshal
Posts: 61774
193
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're welcome
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!