+ Start a Discussion
CarlBCarlB 

Can an interface extend multiple interfaces

Hi,

I have two interfaces, called A and B and I want to create a third interface, called C, that extends both of these, e.g.
global interface C extends A, B {
 
}

However, it isn't valid.  Have I missed something or does Salesforce not allow this?

Thanks,

Carl
SaranshSaransh
You are perfectly right but this is support in JAVA but not in Apex. I have even tried to create an abstract class instead of interface and tried to inherit it but didn't worked.

Best way of doing it by taking only one interface A and define every method of B inside it.
CarlBCarlB
Hi.

Thanks for the reply.

It does seem an odd omission by Salesforce, but at least there is a work-around.

Regards,

Carl
RoninCWalkerRoninCWalker
I'm trying to do the same thing and just got my answer here :(

Indeed a very odd omission. Question is WHY? and can we place as an Idea?