This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
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


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Compiler error...