Page 1 of 1

[HD-OCP17/21-Fundamentals Pg 0, Sec. 14.1.4 - functional-interfaces]

Posted: Mon Dec 02, 2024 5:15 pm
by joaoclopes
Hello!

here:

Code: Select all

@FunctionalInterface //Not OK 
//NewMover has two abstract methods including the one that it inherited from Mover
interface NewMover extends Mover{
   void m2(String str);
}
Shoudn't it be NewMove has three abstract methods including the two that it inherited from Mover?

Thanks!

Re: [HD-OCP17/21-Fundamentals Pg 0, Sec. 14.1.4 - functional-interfaces]

Posted: Mon Dec 02, 2024 5:17 pm
by joaoclopes
void move(int x, int y);
void move3D(int x, int y, int z);
void m2(String str);

In this case those 3 methods.

Re: [HD-OCP17/21-Fundamentals Pg 0, Sec. 14.1.4 - functional-interfaces]

Posted: Mon Dec 02, 2024 11:45 pm
by admin
There are multiple definitions of Mover in that section and one of them has one abstract and one default method. So may be the author is referring to that but it is definitely confusing and should be fixed.
thank you for your feedback!