This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Originally posted by Sue Pillai: Can I extend and implement an anonymous inner class? What is the syntax if say Super is the super class and MyInt is the interface I want to implement?
If you mean, "Can I extend an anonymous inner class?". Then the answer is no. They are implicitly final.
If you mean, "Can I write an anonymous inner class that extends a class and implements an interface"? If so, then no. You can write an anonymous inner class that either extends a class or implements an interface.
To implement an inteface, you would use:
To extend a class you would use:
Hope this helps, if you have more questions, just ask.