java - How to call methods of a nested interface -
i have interface iouter
, nested interface iinner
. like
interface iouter { public void outera(); interface iinner { public void innera(); } }
both iouter
, iinner
having setter api's.
made nested interface because setter api's valid inner interface.
both outer , inner interface implemented in single class not exposed outside world.
outside application interacting our code through interface iouter
. problem since don't have object of nested interface not able call nested interface api's.
don't want move nested interface api's outer interface might misunderstood.
you can implement both iouter
, iinner
interfaces. example:
public class test implements iouter, iouter.iinner { @override public void outera() { } @override public void innera() { } }
Comments
Post a Comment