Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-01-2007, 11:50 AM
Member
 
Join Date: Jun 2007
Posts: 21
Rep Power: 0
ai_2007 is on a distinguished road
Default Error while compiling
Code:
public abstract Component ();
The above line of code is part of a class that I have created. But when I compile that class an error message pops up saying:

invalid method declaration; return type required.,

and the above line of code is highlighted.

How do I resolve this?
Bookmark Post in Technorati
Reply With Quote
  #2 (permalink)  
Old 07-01-2007, 12:37 PM
JavaBean's Avatar
Moderator
 
Join Date: May 2007
Posts: 1,272
Rep Power: 10
JavaBean is on a distinguished road
Default
What do you want to do with that line? If it is a method declaration, you need to specify the return type as the error message says. To solve the problem, you should write something like this depending on the return type you have:

Code:
     public abstract Component getMyComponent();
Bookmark Post in Technorati
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
compiling trouble capacitator CLDC and MIDP 4 06-10-2008 11:12 PM
Compiling error lawksalih New To Java 6 01-29-2008 08:26 PM
I have 3 errors after compiling coco Database 2 10-18-2007 10:32 AM
Error during compiling boy22 New To Java 2 08-03-2007 03:42 AM
problems when compiling valery New To Java 2 07-25-2007 08:35 PM


All times are GMT +2. The time now is 09:13 PM.



VBulletin, Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2009, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org