2021年10月22日
摘要: 1 package com.bytezero.stringclass; 2 3 import org.junit.Test; 4 5 import java.util.Date; 6 7 8 /** 9 * JDK 8 之前日期和时间的API测试 10 * 11 * 12 * 13 * @autho 阅读全文
posted @ 2021-10-22 23:20 Bytezero! 阅读(40) 评论(0) 推荐(0) 编辑
摘要: 1 package com.bytezero.stringclass; 2 3 import org.junit.Test; 4 5 /** 6 * 关于 StringBuffer 和 StringBuilder的使用 7 * 8 * 9 * 10 * 11 * @author Bytezero1· 阅读全文
posted @ 2021-10-22 22:39 Bytezero! 阅读(58) 评论(0) 推荐(0) 编辑
摘要: 1 /** 2 * 3 * String 与 byte[]之间的转换 4 * 编码:String > byte[]:调用String的getBytes() 5 * 解码:byte[] >String: 调用String的构造器 6 * 7 * 8 * 编码: 字符串 >字节(看得懂 >看不懂二进制数 阅读全文
posted @ 2021-10-22 13:04 Bytezero! 阅读(82) 评论(0) 推荐(0) 编辑
摘要: 1 /* 2 String 与 char[]之间的转换 3 4 String > char[]:调用String的toCharArray() 5 char[] >String:调用String的构造器 6 */ 7 @Test 8 public void test6(){ 9 String str1 阅读全文
posted @ 2021-10-22 12:08 Bytezero! 阅读(53) 评论(0) 推荐(0) 编辑
摘要: 1 /* 2 涉及到String类与其他结构之间的转换 3 4 */ 5 6 //String 与 基本数据类型,包装类之间的转换 7 //String >基本数据类型,包装类:调用包装类的静态方法:parseXxx(str) 8 //基本数据类型,包装类 -->String :调用String重载 阅读全文
posted @ 2021-10-22 11:55 Bytezero! 阅读(52) 评论(0) 推荐(0) 编辑
摘要: 1 /** 2 * String常用方法3 3 * 替换: 4 * String replace(char oldChar,char newChar): 返回一个新的字符串,它是通过 5 * 用newChar替换此字符串中出现的所有oldChar得到的 6 * String replace(Char 阅读全文
posted @ 2021-10-22 10:31 Bytezero! 阅读(39) 评论(0) 推荐(0) 编辑
摘要: 1 /** 2 * String 常用方法(2) 3 * boolean endsWith(String suffix):测试此字符串是否以指定的后缀结束 4 * boolean startsWith(String prefix): 测试此字符串是否以指定的前缀开始 5 * boolean star 阅读全文
posted @ 2021-10-22 09:59 Bytezero! 阅读(23) 评论(0) 推荐(0) 编辑
摘要: 1 package com.bytezero.stringclass; 2 3 import org.junit.Test; 4 5 import java.sql.SQLOutput; 6 import java.util.Locale; 7 8 /** 9 * 10 * String 常用方法( 阅读全文
posted @ 2021-10-22 09:00 Bytezero! 阅读(50) 评论(0) 推荐(0) 编辑