> Hello all. I have several separate interfaces defined that I'd like
> to then lump together into one big interface file. The catch here is
[quoted text clipped - 33 lines]
> public void Foo3(){}
> }
> pulibc interface FooCombined extends FooInterfac1, FooInterfac2,
> FooInterfac3 {
>
> }
>
> - Oliver
Weird, I thought that you could only extend one thing. I guess that
only applies to classes and not to interfaces since the compiler seems
happy. Neat, thanks!
-Will
Oliver Wong - 13 Feb 2007 16:43 GMT
>> pulibc interface FooCombined extends FooInterfac1, FooInterfac2,
>> FooInterfac3 {
[quoted text clipped - 4 lines]
> only applies to classes and not to interfaces since the compiler seems
> happy. Neat, thanks!
Right. You can only extend one class, but you can extend and/or
implement as many interfaces as you want. The reason why you can only extend
one class is to avoid the diamond problem:
http://en.wikipedia.org/wiki/Diamond_problem
- Oliver