You could use class inheritance as well as interface inheritance, don't you? Or could interfaces have multiple parents while classes could not? [i'm not friend of multiple inheritance anyway]
I tried to redesign it (mainly to test whether this interface usage does problems to gcj or not - seems
Andrew C. Oliver wrote:
I do that too. Only in order to meet POI coding standards I do:
/**
* Really great javadoc comments
* @author Andrew C. Oliver <[EMAIL PROTECTED]>
*/
interface ReallyNiceName {
/**
* More great comments!
*/
final static int REALLY_DESCRIPTIVE_NAME = 1;
}
Thes
Not to mention how disgusting it makes your code to have to do
TheClassName.BLA_BLA in every method call when BLA_BLA is sufficient.
Makes for long unnecessary line lengths. Using the interface is the
best simulation of name spaces combined with defines.
Rainer Klute wrote:
I do not cast doub
I do that too. Only in order to meet POI coding standards I do:
/**
* Really great javadoc comments
* @author Andrew C. Oliver <[EMAIL PROTECTED]>
*/
interface ReallyNiceName {
/**
* More great comments!
*/
final static int REALLY_DESCRIPTIVE_NAME = 1;
}
Rainer Klute wrote:
Hi Marti
> >I do not cast doubt upon use of constants in interfaces (esp. in case you outline)
>but write intarface consting _only_ of constants? I think in this case is much better
>use of public class - there is no need to derive from it or implement something. Just
>public + class reference is enough.
>I do not cast doubt upon use of constants in interfaces (esp. in case you outline)
>but write intarface consting _only_ of constants? I think in this case is much better
>use of public class - there is no need to derive from it or implement something. Just
>public + class reference is enough. A
> Hi Martin!
Hi!
> >Why are you using this contruct?:
> >
> >interface ABC {
> > final static int C1 = 1;
> >}
> >...
>
> >Is this common use of interfaces in Java? ...
>
> This is indeed common usage. You'll need it if you want to specify an
> interface that does not only define methods bu
Hi Martin!
>Why are you using this contruct?:
>
>interface ABC {
> final static int C1 = 1;
>}
>...
>Is this common use of interfaces in Java? ...
This is indeed common usage. You'll need it if you want to specify an
interface that does not only define methods but also some constants that
ar
Hi all,
I'm a language purist so take me with a pinch of salt [I found this in dictionary so
hope it fits ;-)]
Why are you using this contruct?:
interface ABC {
final static int C1 = 1;
}
class DEF implements ABC
{
... using C1 constant...
}
Is this common use of interfaces in Ja