Long story shot:
It's an interesting and sometimes subtle aspect of Java! Even if you don’t explicitly use the static keyword, any interface declared inside a class is implicitly static by definition. --ChatGPT
This means you can reference it without creating an instance of the enclosing class, and it behaves independently of any specific instance of the outer class.
I might be late to the party here.
But as I'm learning more about Java, I find it really interesting.
chatGPT told me this :
Double-check your understanding. Java won't allow truly non-static interfaces nested in classes.
which has brought me here so to say.
I was debating this with ChatGPT, as it stated that inner interfaces are static.
I removed the 'static' keyword from its definition and my code worked, only for it to later tell me that even without the keyword, an inner interface is still static.