Skip to content
Advertisement

Tag: local-class

Is there such a thing as a “local interface” in Java?

Java allows me to define local abstract classes, like in this example: For some reason, when I try to define a “local interface” instead of the local class, like this: Java complains that “The member interface Bar can only be defined inside a top-level class or interface”. Is there a reason for this? Or am I missing a mistake I

Advertisement