?? jiecheng3.java
字號:
public class JieCheng3 { static long[] table = new long[21]; static { table[0] = 1; } static int last = 0; public static long factorial(int x) throws IllegalArgumentException { if (x >= table.length) throw new IllegalArgumentException("Overflow; x is too large."); if (x<0) throw new IllegalArgumentException("x must be non-negative."); while(last < x) { table[last + 1] = table[last] * (last + 1); last++; } return table[x]; }}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -