Can we overload constructors in anonymous classes? Also can we override the default no-arg constructors? If yes, pls explain with an example. Is there any way I can invoke sizzle() on an anonymous subclass of Popcorn?
Using an anonymous class instance, you can only call methods that the parent class or implemented interface is having. Just remember, polymorphism. You can only use anonymous class specific methods inside the class only, but not outside using the reference variable.