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

Help and support on OCA OCP Java Programmer Certification Questions
1Z0-808, 1Z0-809, 1Z0-815, 1Z0-816, 1Z0-817

Moderator: admin

Post Reply
joaoclopes
Posts: 26
Joined: Mon Sep 23, 2024 4:49 pm
Contact:

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

Post 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!

joaoclopes
Posts: 26
Joined: Mon Sep 23, 2024 4:49 pm
Contact:

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

Post 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.

admin
Site Admin
Posts: 10326
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

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

Post 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!
If you like our products and services, please help us by posting your review here.

Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests