File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes missing method body error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "missing method body error" Watch "missing method body error" New topic
Author

missing method body error

rajesh villuri
Greenhorn

Joined: Apr 06, 2013
Posts: 4
i typed this program in netbeans

in netbeans, i am getting like this error for all programs

please help ,

Exception in thread "main" java.lang.RuntimeException: Uncompilable source code - missing method body, or declare abstract
at widget.Widget.<init>(Widget.java:10)
at widget.Widget.main(Widget.java:16)
Java Result: 1
fred rosenberger
lowercase baba
Bartender

Joined: Oct 02, 2003
Posts: 10923
    
  12

look VERY closely at this line, and let us know if you find something that perhaps shouldn't be there:



There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 36555
    
  16
And welcome to the Ranch
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 36555
    
  16
I have added code tags, which you should always use, to your code, hoping it would make it look better (it does) and make the lines numbers visible, but the error Fred pointed out appears not to be on lines 10 and 16, but 6.
rajesh villuri
Greenhorn

Joined: Apr 06, 2013
Posts: 4
thank you ritchie
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 36555
    
  16
You're welcome
 
jQuery in Action, 2nd edition
 
subject: missing method body error
 
Similar Threads
synchronized Combination of WA and Opensource?
can anyone explain output
Threads - Bill Brodgen
Generic declarations "? super" Vs. "? extends"
The server sent HTTP status code 400: Bad Request error getting when accessing web service in eclips