wood burning stoves 2.0*
The moose likes Cattle Drive and the fly likes Compiler error... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » This Site » Cattle Drive
Bookmark "Compiler error..." Watch "Compiler error..." New topic
Author

Compiler error...

ryan burgdorfer
Ranch Hand

Joined: Jan 24, 2001
Posts: 219
Hopefully, someone can provide some insight into this without the code being posted:
I have a private method outside of the main method, which I am trying to call from within the main method. But when I try to compile, I get the error "Can't make static reference to method (methodname) in class Times." The method returns a String object, and also takes a String as a parameter. The only things in the program are the two methods: my private one, and the main.
~Ryan


<UL TYPE=SQUARE><I><LI>Ryan Burgdorfer<BR><LI>Java Acolyte</I></UL>
ryan burgdorfer
Ranch Hand

Joined: Jan 24, 2001
Posts: 219
AHA...
I had to explicitly declare my method as static.
Duh.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Compiler error...