Skip to content
Advertisement

access interface out of the class java

I have a class A, another is B, there is one interface Ai with one method ok() only.

Class A implements Ai, inside the ok I’m printing just a line.

Class B has an instance of A, I want to access A’s interface Ai inside B.

Can it be done ? If so how ?

JavaScript

Advertisement

Answer

JavaScript

All I needed is this. Have query? Comment please.

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement