Error while compiling
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:
public abstract Component ();
invalid method declaration; return type required.,
and the above line of code is highlighted.
How do I resolve this?
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:
public abstract Component getMyComponent();