• 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

DOT operator

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've bought Head First into JAVA and now I've reached chapter five, where I have to build a game.

the program won't compile, so I ask to you: what am I doing wrong?

the images show the code and the error I get from the Windows Prompt Operator.

I hope somebody can help.

Thanks in advance.
JAVA-code.PNG
[Thumbnail for JAVA-code.PNG]
Error-JAVA-code.PNG
[Thumbnail for Error-JAVA-code.PNG]
 
Saloon Keeper
Posts: 15510
363
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to CodeRanch!

The compiler is basically telling you that the SimpleDotCom class doesn't contain a checkYourself(String) or a setLocationCells(int[]) method.
 
Saloon Keeper
Posts: 10705
86
Eclipse IDE Firefox Browser MySQL Database VI Editor Java Windows ChatGPT
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
SimpleDotCom does not have the setLocationCells() or the checkYourself() methods defined, or they are defined to take different arguments. Do you have the documentation or source code for this class?

In the future, please don't post screen snapshots, cut and paste the code into a post instead. This goes for error messages as well.
 
I am displeased. You are no longer allowed to read this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic