posted 18 years ago
Adding some code around the fragment that you have given, to give it some contextual meaning
Observe that inside the makebar() method, we are creating an anonymous inner class, which is the subclass of class Sample. This inner class doesnot override any methods from the superclass. And then we just call the go() method on the newly created instance.