`
thingkau
  • 浏览: 72466 次
  • 性别: Icon_minigender_1
  • 来自: 泉州
社区版块
存档分类
最新评论
文章列表
import java.io.*; /** * * 该类实现列出某个目录下的所有目录和文件的功能. * 给定路径如:strPath = e:\\Flash * 在命令行输入 java FileTree e:\\Flash * * @author Administrator */ public class FileTree { public static void getDirAndFiles(String strPath) throws Exception { File f = new File(strPath); ...

求n阶乘

/** * Factorial.java * * 该类从命令行接受数字参数,实现n的阶乘. * * @author Administrator */ public class Factorial { public static int factorial(int n) { if(n > 1) { return n*factorial(n - 1); }else { return 1; } } public static void main(String[] args ...
Global site tag (gtag.js) - Google Analytics