上一页 1 ··· 10 11 12 13 14
摘要: File类的判断功能 @Test public void test5(){ File file = new File("hello.txt"); //判断是否是文件目录 System.out.println(file.isDirectory()); //判断是否是文件 System.out.prin 阅读全文
posted @ 2019-10-18 16:45 地中有山 阅读(158) 评论(0) 推荐(0)
摘要: File类的获取功能 @Test public void test2(){ File file1 = new File("hello.txt"); File file2 = new File("C:\\Users\\Mi\\Documents\\project\\idea\\JavaBase\\he 阅读全文
posted @ 2019-10-18 16:41 地中有山 阅读(138) 评论(0) 推荐(0)
摘要: 构造器1 File(String pathname) //相对路径 File file1 = new File("hello.txt"); //windows绝对路径 File file2 = new File("C:\\Users\\Mi\\Documents\\project\\idea\\Ja 阅读全文
posted @ 2019-10-18 16:35 地中有山 阅读(315) 评论(0) 推荐(0)
摘要: 定义新的 Annotation 类型使用 @interface 关键字 自定义注解自动继承了java.lang.annotation.Annotation接口 Annotation 的成员变量在 Annotation 定义中以无参数方法的形式来声明。其方法名和返回值定义了该成员的名字和类型。我们称为 阅读全文
posted @ 2019-09-30 11:42 地中有山 阅读(165) 评论(0) 推荐(0)
摘要: @Override: 限定重写父类方法, 该注解只能用于方法 @Deprecated: 用于表示所修饰的元素(类, 方法等)已过时。通常是因为所修饰的结构危险或存在更好的选择 @SuppressWarnings: 抑制编译器警告 package com.annotation.javadoc; pub 阅读全文
posted @ 2019-09-30 11:32 地中有山 阅读(136) 评论(0) 推荐(0)
上一页 1 ··· 10 11 12 13 14