?? father.java
字號:
public class Father{
int a=100;
int b=10;
public void miner(){
a--;
}
public static void main(String[] arg){
Father x=new Father();
Son y=new Son();
System.out.println("a of son is :" +y.a);
y.getA();
y.miner();
System.out.println("a of son is :"+y.a);
y.getA();
y.getB();
System.out.println("b of son is :"+y.b);
System.out.println("b of father is :"+x.b);
}
}
class Son extends Father {
int a=0;
public void getA(){
System.out.println(super.a);
}
public int getB(){
b=b-2;
return b;
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -