会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Boerk
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
6
7
8
9
10
11
下一页
2021年12月10日
IO流
摘要: 字符输入 //输入字符流 String inpath2=null; File inFile2 = new File(inpath2); FileReader reader = new FileReader(inFile2); reader.read(); 字符输出 //输出字符流 String ou
阅读全文
posted @ 2021-12-10 11:02 Boerk
阅读(29)
评论(0)
推荐(0)
2021年12月8日
Collection
摘要: Collection必须重写的几个方法 List——必须重写equals()方法 Set——必须重写HashCode和equals方法 TreeSet——必须重写Comparable、Comparator方法。 Comparable(Object obj) Comparator(Object obj
阅读全文
posted @ 2021-12-08 10:53 Boerk
阅读(53)
评论(0)
推荐(0)
2021年12月7日
Collection的几个方法
摘要: Collection coll = new ArrayList();coll.add(123);coll.add(456);Collection coll1 = new ArrayList();coll1.add(123);coll.removeAll(coll1);System.out.print
阅读全文
posted @ 2021-12-07 15:23 Boerk
阅读(83)
评论(0)
推荐(0)
2021年12月6日
枚举类
摘要: 5.0之前自定义枚举类的创建 class Sex{ private final String SEX; private final String SEXTEXT; private Sex(String sex,String SEXTEXT) { this.SEX =sex; this.SEXTEXT
阅读全文
posted @ 2021-12-06 13:04 Boerk
阅读(30)
评论(0)
推荐(0)
JDK8中的Date
摘要: LocalDate localDate = LocalDate.now(); LocalTime localTime = LocalTime.now(); LocalDateTime localDateTime = LocalDateTime.now(); System.out.println(lo
阅读全文
posted @ 2021-12-06 10:46 Boerk
阅读(41)
评论(0)
推荐(0)
SimleDateFormat
摘要: Date的几个用法(姑且成为用法吧) SimpleDateFormat 格式化 1 SimpleDateFormat sdf = new SimpleDateFormat(); 2 Date date = new Date(); 3 System.out.println(date); 4 Strin
阅读全文
posted @ 2021-12-06 09:19 Boerk
阅读(50)
评论(0)
推荐(0)
2021年12月3日
String运用——查找两个字符串的最大子串
摘要: //查找两个字符串的最大子串。 String str1="dsajdwefnadsjaw";String str2="adwefb"; private static String getMaxSameStr(String str1, String str2) { int length1 = str1
阅读全文
posted @ 2021-12-03 15:36 Boerk
阅读(129)
评论(0)
推荐(0)
System和Date相关
摘要: System //1970年1月1日0时0分0秒至现在的毫秒数。 //成为时间戳。 long time = System.currentTimeMillis(); Date Date date = new Date();System.out.println(date.toString); Fri D
阅读全文
posted @ 2021-12-03 11:57 Boerk
阅读(90)
评论(0)
推荐(0)
StringBuffer
摘要: String StringBuffer StringBuilder StringBuffer StringBuilder是可变的,变化时,无返回值。 初始长度为16,每次扩容是默认长度*2+2 StringBuffer.append()→添加元素 StringBuffer.delete(int,in
阅读全文
posted @ 2021-12-03 11:04 Boerk
阅读(32)
评论(0)
推荐(0)
异常抛出
摘要: try-catch-finally try{ //代码段 }catch(异常){ //代码段 }finally{ //除非手动退出系统,否则一定会执行 //Systen.exit(0); } throw-throws throws声明方法内抛出异常;必须跟在方法的参数列表后面,不能单独使用;声明抛出
阅读全文
posted @ 2021-12-03 08:33 Boerk
阅读(27)
评论(0)
推荐(0)
上一页
1
···
6
7
8
9
10
11
下一页
公告