This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes New Java issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "New Java issue" Watch "New Java issue" New topic
Author

New Java issue

Rui Sousa
Greenhorn

Joined: Sep 25, 2013
Posts: 6
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

Joined: Dec 08, 2010
Posts: 1502
    
    5

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.)


Regards,
Anayonkar Shivalkar (SCJP, SCWCD, OCMJD, OCEEJBD)
Rui Sousa
Greenhorn

Joined: Sep 25, 2013
Posts: 6
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

Joined: Oct 02, 2003
Posts: 11153
    
  16

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.


There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Doug Slavens
Greenhorn

Joined: Sep 10, 2013
Posts: 11


Just a suggestion - i did not try it.
 
wood burning stoves
 
subject: New Java issue
 
Similar Threads
Incompatible magic value 188741100
IDE or bust?
Exceptation in thread "main" java.lang.NoSuchMethodError: main
Really, really new to Java. Trying to compile small program, help!
Head First Java Guessing Game