We known that local class of a class exists (for example: local class inside a method of a class), but can we declare a local class of an interface. I reformat the original of local class as follows:
"Local class (of interface) is a non-static member class which have own name (local name) and it can be used inside a default/static/private method of interface".
So, its definition is that correct or not? because when I tried to declare, no Compile-Time error occurs.
Please help me, thank you very much
I give an example as follows:
public interface GlobalClass {
static void functionB() {
class Local {}
};
default void functionC() {
class Local {};
};}
Is that correct or not?