?? superdemo.java
字號:
class A{
int x,y;
public A(int x,int y){
this.x=x;
this.y=y;
}
public void display(){
System.out.println("In class A: x="+x+" , y="+y);
}
}
class B extends A{
int a,b;
public B(int x,int y,int a,int b){
super(x,y);
this.a=a;
this.b=b;
}
public void display(){
super.display();
System.out.println("In class B: a="+a+" , b="+b);
}
}
public class SuperDemo{
public static void main(String[]args){
B a=new B(1,2,3,4);
a.display();
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -