normally anonymous inner classes are created against interfaces / abstract classes. so as Jesper de Jong said, its pointless to create Bar as inner class.
Avinash G.A
OCP Java SE 6 Programmer, OCP Java EE 5 Web Component Developer, OCE Java EE 6 Web Services Developer, VMware Certified Core Spring 3.x Developer, EMC Proven Professional (ISM-V2)
What the empty pair bf braces do, is to delimit a class body which has nothing in. So you are creating an instance of an anonymous subclass of Bar which embodies no changes!It will only compile if the superclass has an accessible no-arguments or default constructor.