⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 jiecheng3.java

📁 java应用举例1
💻 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];    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -