v.java.bak

来自「java课件及例程有一些PPT及一些例程」· BAK 代码 · 共 25 行

BAK
25
字号
class A
{
    int x=3;
    public void m()
    {
        System.out.println("the x of A is "+x);
    }
}
class V extends A
{
    double x=20.67;  //也可定义为其它类型,如double x;
    public void m()
    {
        System.out.println("the x of V is "+x);
        System.out.println("the x of superclass is "+super.x);
        super.m();
    }

    public static void main(String[] args)
    {
        V b = new V();
        b.m();    	
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?