七、系统工作过程及运行说明
八、实例程序运行结果示例一代码
class
Main{
public static void main(String[] args){
System.out.println(10);
}
}
class G{
public int get(int num){
int a;
a=2;
return a+5;
}
}
class H extends G{
int i;
boolean bol;
public int put(){
i=1+2;
i=12-3;
i=2*7;
bol=true && false;
bol=1<2;
return 10;
}
}
继承树
符号表
内存分配表
示例二代码
class Factorial {
public static void main(String[] a) {
System.out.println(new Fac().ComputeFac(10));
}
}
class Fac extends Factorial{
Fac f;
Factorial ff;
int i;
public int ComputeFac(int num) {
int numaux;
if (num < 1)
numaux = 1;
else
numaux = num * (this.ComputeFac(num-1));
return numaux;
}
}
class F extends Fac{
}
class G extends Factorial{
}
class H{}
class I extends H{}
class J extends I{}
class GG extends I{}
class DD extends I{}
继承树
符号表
内存分配表