• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Missing method body? Eeek!

 
Brandi Love
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9295
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Brandi Love
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
oh lord I can't believe I didn't notice that. Thanks much
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic