Sunday, 15 January 2012

Why java provide facility to declare interface inside interface -



Why java provide facility to declare interface inside interface -

i trying different combination of inner classes.i wonder java gives facility write interface within interface.it not give me compile time error. can tell me utilize of ?

public interface ia { public interface ib{ } }

this enables set sub interface in namespace might create more sense different package. illustration of java api map.entry interface. entry makes sense in context of implements map interface, defined interface within interface.

note other inner classes, inner interfaces static, jesse glick mentions in his answer related question.

java interface

No comments:

Post a Comment