Win a copy of The Journey To Enterprise Agility this week in the Agile and Other Processes forum! And see the welcome thread for 20% off.
  • 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:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

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: 59681
187
  • 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: 59681
187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're welcome
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!