代码如下:
import java.awt.*; import javax.swing.*; //*********Found********** public class Java_3 extends _____________________ { JTextArea outputArea; public void init() { outputArea = new JTextArea(); //*********Found********** Container c = ____________________(); // Get Content Pane //*********Found********** c.add(__________________); //计算0至10的阶乘 for (long i = 0; i <= 10; i++) { outputArea.append( i + "! = " + factorial(i) + "\n"); } } //阶乘的递归定义 public long factorial(long number) { if (number <= 1) { return 1; } else { return number * factorial(number - 1); } } }