Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

New Java issue

 
Rui Sousa
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
this fraction of code is telling me it cant find the symbol startGame method but i´ve already created the method. don´t know why it can´t find it.


 
Anayonkar Shivalkar
Bartender
Posts: 1557
5
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Rui,

Rui Sousa wrote: i´ve already created the method

As of now, I can see that you've provided complete definition of class GameLauncher, and there is no startGame method in it. Are you sure this is the complete code you've written?

Also, I would like to suggest to have a look at what exactly the error message says. Java compiler errors, most of the time, are very explanatory and contains lot of information (e.g. what is missing, which class, which line etc.)
 
Rui Sousa
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anayonkar Shivalkar wrote:Hi Rui,

Rui Sousa wrote: i´ve already created the method

As of now, I can see that you've provided complete definition of class GameLauncher, and there is no startGame method in it. Are you sure this is the complete code you've written?

Also, I would like to suggest to have a look at what exactly the error message says. Java compiler errors, most of the time, are very explanatory and contains lot of information (e.g. what is missing, which class, which line etc.)


ok, ther is the entire code

 
fred rosenberger
lowercase baba
Bartender
Posts: 12086
29
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
so where exactly do you think the method "startGame" is defined for the GameLauncher class?

If you had created a GuessGame object...THAT class has a startGame method. but your game variable is of type GameLauncher, which most certainly does NOT Have a startGame method.
 
Doug Slavens
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Just a suggestion - i did not try it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic