米字键

博客园 首页 新随笔 联系 订阅 管理

2019年3月23日 #

摘要: import java.io.File; import java.io.FileFilter; //创建一个功夫类继承文件管理类 public class FileFu implements FileFilter{ // 添加路径名 返回值类型为布尔型 public boolean accept(F 阅读全文
posted @ 2019-03-23 20:12 米字键 阅读(730) 评论(0) 推荐(0)

摘要: import java.io.File; import java.io.IOException; public class FileD { public static void main(String[] args) throws IOException { fun(); System.out.pr 阅读全文
posted @ 2019-03-23 19:35 米字键 阅读(405) 评论(0) 推荐(0)

摘要: import java.io.File; public class FileDOm { /** 2 遍历出C盘下的文件 */ public static void main(String[] args) { //定义要查看的盘符 File fie =new File("c:"); //显示c盘下的所 阅读全文
posted @ 2019-03-23 17:28 米字键 阅读(259) 评论(0) 推荐(0)

2019年3月22日 #

摘要: import java.util.HashMap;import java.util.Iterator;import java.util.Set;import java.util.Map.Entry;public class MapDome { // Map 嵌套存储Map // aaa // jav 阅读全文
posted @ 2019-03-22 20:19 米字键 阅读(1044) 评论(0) 推荐(0)

2019年3月21日 #

摘要: /** * 创建线程的第二种方法 实现Runnable接口 * 步骤 * 1、定义一个类实现Runnable接口 * * 2、覆盖Runnable接口中的 run方法 * 将线程要运行的代码放在run方法中 * * 3、同过Thread类建立线程对象 * * 4、将Runnable接口的子类对象作为 阅读全文
posted @ 2019-03-21 16:24 米字键 阅读(301) 评论(0) 推荐(0)

摘要: public class LinkedlistDome { public static void main(String[] args) { fun(); } public static void fun(){ //创建多态集合 Collection<String >co=new ArrayList 阅读全文
posted @ 2019-03-21 13:47 米字键 阅读(97) 评论(0) 推荐(0)

摘要: public class GH { public static void main(String[] args) { //使用多态的方式来创建集合 Collection co=new ArrayList<String>(); //分别赋五个值 co.add("张"); co.add("张1"); c 阅读全文
posted @ 2019-03-21 11:57 米字键 阅读(120) 评论(0) 推荐(0)

摘要: public class Calendardome { //闰年计算 将日历设置到指定的年份 3月1日 add 向前偏移一天 //获取天数 29为闰年 public static void main(String[] args) { fun(); } public static void fun() 阅读全文
posted @ 2019-03-21 11:48 米字键 阅读(180) 评论(0) 推荐(0)

2019年3月19日 #

摘要: public class Homework { public static void main(String[] args) throws ParseException { lower(); 全部调用 upper(); repalce(); repalce1(); trim(); public st 阅读全文
posted @ 2019-03-19 22:02 米字键 阅读(591) 评论(0) 推荐(0)

摘要: /* boolean isEmpty(): 判断字符串是不是空串, 如果是空的就返回true */ public class Str { public static void main(String[] args) { // 定义空字符串 String s=""; // 判断是否为空 boolean 阅读全文
posted @ 2019-03-19 21:36 米字键 阅读(849) 评论(0) 推荐(0)