• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 79151
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 79151
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You're welcome
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic