摘要: package cn.lijun.demo3; //求和 1+2+...n public class DiGui { public static void main(String[] args) { int sum = getSum(3); System.out.println(sum); } public static int getS... 阅读全文
posted @ 2019-03-24 20:43 芯-觞 阅读(126) 评论(0) 推荐(0) 编辑
摘要: package cn.lijun.demo3; import java.io.File; public class FileDemo3 { public static void main(String[] args) { //过滤器: 指定 一个目录下拓展名的文件 或者是包含某个关键字的文件 .java File file=new Fil... 阅读全文
posted @ 2019-03-24 20:35 芯-觞 阅读(103) 评论(0) 推荐(0) 编辑
摘要: package cn.lijun.demo3; import java.io.File; import java.io.IOException; // 创建文件功能 如果文件已经存在 不再创建 public class FileDemo2 { public static void main(String[] args) throws IOException { ... 阅读全文
posted @ 2019-03-24 20:34 芯-觞 阅读(152) 评论(0) 推荐(0) 编辑
摘要: IO定义:将内存的数据 持久化到设备上 这个动作称为输出 写 Output操作 把硬盘上的数据读取到内存 这个动作称为输入 读 Input 把上面这两种操作称为IO操作 File类的静态成员变量:pathSeparator separator package cn.lijun.demo1; import java... 阅读全文
posted @ 2019-03-24 20:31 芯-觞 阅读(302) 评论(0) 推荐(0) 编辑
摘要: package cn.lijun.demo; /* * try { //需要被检测的语句。 } catch(异常类 变量) { //参数。 //异常的处理语句。 } finally { //一定会被执行的语句。 } * * */ public class ExceptionDemo { public static void main(String[] args) { ... 阅读全文
posted @ 2019-03-24 19:38 芯-觞 阅读(478) 评论(0) 推荐(0) 编辑