nested in class A. in this case i extended that class A implicitly, right?
Nope. I remember a nice case with visitors where I had nested interfaces, let me find it
https://pastebin.com/g9t3d3xg As you can see, you may use nested interfaces wherever you want. They are not very much related in mechanics to their enclosing class. Only semantically. I guess, that even class loader loads them independently from their enclosing class. But compiler probably compiles nested and enclosing as a single compilation unit, I feel
Обсуждают сегодня