What is
the internal code generated by the compiler for member inner class ?
InnerClassDemo.class
InnerClassDemo$A.class
InnerClassDemo$B.class
Java Anonymous Inner Class of a Class Type
public class AnonymousClassDemo
{
{
Dog dog = new Dog() {
public void someDog ()
{
}
}; // anonymous class body closes here
//dog
contains an object of anonymous subclass of Dog.
dog.someDog();
}
}
class Dog
{
public void someDog()
{
}
}
Comments
Post a Comment