Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-01-2007, 11:50 AM
Member
 
Join Date: Jun 2007
Posts: 21
ai_2007 is on a distinguished road
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
Sponsored Links
  #2 (permalink)  
Old 07-01-2007, 12:37 PM
JavaBean's Avatar
Moderator
 
Join Date: May 2007
Posts: 1,272
JavaBean is on a distinguished road
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
Sponsored Links
Reply


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

vB 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 +3. The time now is 01:32 PM.


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