This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Missing method body? Eeek! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Missing method body? Eeek!" Watch "Missing method body? Eeek!" New topic
Author

Missing method body? Eeek!

Brandi Love
Ranch Hand

Joined: Sep 19, 2003
Posts: 133
I am writing a program for an assugnment for my com sci class. It is supposed to test whether an entered string is a palindrome or not. When I try to compile I keep getting this error:
C:\Documents and Settings\Administrator.HD5\Desktop\palindrome.java:22: missing method body, or declare abstract
public static void main(String[] args)
^
Can anyone tell me why, or how I might be able to fix it?
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 9137
    
    9

When one ends a method declaration with a semicolon, they are indicating that they are not planning on implementing that method, hence the request from the compiler that you declare your class to be abstract.


[How To Ask Questions On JavaRanch]
Brandi Love
Ranch Hand

Joined: Sep 19, 2003
Posts: 133
oh lord I can't believe I didn't notice that. Thanks much
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: Missing method body? Eeek!
 
It's not a secret anymore!