提示:您可在线编辑运行本教程的实例 - 运行实例,去试试!
说明函数调用堆栈
/* from 时 代 J a v a*/ public class Main { static double G(double x) { double result; result = Math.pow(x, 2.5); return result; } static double F(double x) { double result; result = 1.0 + G(x * x); return result; } public static void main(String[] args) { double y; y = F(5.0); System.out.println("y=" + y); } }