What is the use of this private nested interface?
Below code is for reference:
class a {
private static interface Ione {
void mone();
}
}
What is the use of this private nested interface?
Below code is for reference:
class a {
private static interface Ione {
void mone();
}
}
You do this when the function of the method only relates to the containing class and even then its not really something you have to do. This would be one of those coding preference things. So as an example you would have other classes that want to implement Ione and you would want those other classes to know that Ione is related to class a.
public class SomeOtherClass implements a.Ione {
...
}