摘要:
1 public class Test { 2 public static void main(String[] args) { 3 String n1 = getName("www.baidu.com"); 4 String n2 = getName("http://doc.canglaoshi. 阅读全文
posted @ 2021-09-22 20:50
牵你不解释
阅读(1327)
评论(0)
推荐(0)
摘要:
1 /** 2 * String substring(int start,int end) 3 * 截取当前字符串中指定范围内的字符串. 4 * 两个参数分别表示开始位置和结束位置. 5 * 注:在JAVA API中有一个特点,通常使用两个数字表示范围时都是"含头不含尾"的. 6 * 即:包含开始位 阅读全文
posted @ 2021-09-22 20:47
牵你不解释
阅读(555)
评论(0)
推荐(0)
摘要:
1 public class StringBuilderDemo { 2 public static void main(String[] args) { 3 String line = "好好学习java"; 4 5 /* 6 StringBuilder与StringBuffer的功能是完全一样的 阅读全文
posted @ 2021-09-22 20:44
牵你不解释
阅读(381)
评论(0)
推荐(0)
摘要:
1 /** 2 * boolean startsWith(String str) 3 * boolean endsWith(String str) 4 * 判断字符串是否是以给定的内容开始或结束的 5 * 6 */ 7 public class StartsWithDemo { 8 public s 阅读全文
posted @ 2021-09-22 20:39
牵你不解释
阅读(80)
评论(0)
推荐(0)
摘要:
1 /** 2 * String replaceAll(String regex,String str) 3 * 将当前字符串中满足正则表达式的部分替换为给定内容 4 */ 5 public class ReplaceAllDemo { 6 public static void main(Strin 阅读全文
posted @ 2021-09-22 20:37
牵你不解释
阅读(122)
评论(0)
推荐(0)
摘要:
/** * char charAt(int index) * 获取当前字符串中指定位置处的字符 */ public class CharAtDemo { public static void main(String[] args) { // 0123456789012345 String line 阅读全文
posted @ 2021-09-22 20:35
牵你不解释
阅读(229)
评论(0)
推荐(0)
摘要:
1 public class BinarySortTree<E extends Comparable<E>> { 2 //根节点 3 private Node root; 4 private int size; //0 5 6 //添加操作 7 public boolean add(E e){ 8 阅读全文
posted @ 2021-09-22 20:31
牵你不解释
阅读(36)
评论(0)
推荐(0)

浙公网安备 33010602011771号