abstract class J_Class
{
int a;
public J_Class (int i)
{
a=i;
}
public abstract void m();
}
public class J_InnerClass
{
public static void main(String args[])
{
J_Class b=new J_Class(8)
{
public void m()
{
System.out.println("a="+a);
}
};//父类型为类J_Class 的匿名内部类结束
b.m();
}
} |
|