interface Bouncable{ }
interface Colorable extends Bouncable{ }
class Super implements Colorable{ }
class Sub extends Super implements Colorable {} // Ok (case -1)
But,
class Sub implements Colorable extends Super {} // error (case -2)
Why case-2 showing compilation error { expected
. Why ?? Although, case-1 executes without error.
extends
should go before implements
:
class Sub extends Super implements Colorable {}