Re: java class hierarchy
Thomas wrote:
1)Hello I noticed that java needs a separated file for each file.
You mean for each /class/, and it doesn't -- it requires a separate
file for each /public/ class.
Isn't it too much ?
No.
I writing a simple project and have to use too many of them I
suppose. Is there any way to reduce it, for example putting the code of
several classes into one file ?
(a) nested classes.
(b) non-public classes.
(c) why does it worry you?
(d) using an IDE may help.
2) I have two interfaces :
==============================================================
public interface Value {
double evaluate () throws IllegalStateException;
}
=============================================================
public interface Arguments extends Value
{
int arity ();
int missingArguments ();
void addArguments (double) throws IllegalStateException;
}
=================================================================
I get identifier expected at the last line it the second class, Whats wrong
?
The expected identifier following the type `double` for the method
`addArguments` isn't there.
--
Chris "remembering Sirius Cybernetics" Dollin
Hewlett-Packard Limited registered no:
registered office: Cain Road, Bracknell, Berks RG12 1HN 690597 England