上一页 1 ··· 23 24 25 26 27 28 29 30 31 ··· 133 下一页
摘要: ``` // class 子类 extentd 父类 {} // 很多情况下: 会把子类称为派生类,把父类称为超类(superCall) class Person { private String name; private int age; public void setName(String n 阅读全文
posted @ 2023-06-07 14:45 盘思动 阅读(18) 评论(0) 推荐(0)
摘要: ## demo1 concat ``` String strA = "www.mldn.cn"; String strB = "www." . concat("mldn") . concat(".cn"); System.out.println(strB); System.out.println(s 阅读全文
posted @ 2023-06-07 13:21 盘思动 阅读(16) 评论(0) 推荐(0)
摘要: * format ``` public class HelloWorld { public static void main(String args[]){ String name = "张三"; int age = 19; double score = 8.8; String str = Stri 阅读全文
posted @ 2023-06-07 09:20 盘思动 阅读(16) 评论(0) 推荐(0)
摘要: * substring , 经常结合indexOf,lastIndexOf 使用, ``` String str = "www.mldn.cn"; System.out.println(str.substring(4));// 4之后都截取 System.out.println(str.substr 阅读全文
posted @ 2023-06-06 23:09 盘思动 阅读(14) 评论(0) 推荐(0)
摘要: * split ``` public class HelloWorld { public static void main(String args[]){ String str = "hello world hello mldn"; // split 按照指定字符串全部拆分 // String re 阅读全文
posted @ 2023-06-06 22:58 盘思动 阅读(21) 评论(0) 推荐(0)
摘要: * replaceAll,replaceFirst ``` String str = "helloworld"; System.out.println(str.replaceAll("l","_"));// 全替换 System.out.println(str.replaceFirst("l","_ 阅读全文
posted @ 2023-06-06 22:45 盘思动 阅读(13) 评论(0) 推荐(0)
摘要: * contains indexOf, lastIndexOf,startsWith,endWith ``` public class HelloWorld { public static void main(String args[]){// String args[]字符串数组的意思 Strin 阅读全文
posted @ 2023-06-06 22:39 盘思动 阅读(20) 评论(0) 推荐(0)
摘要: ### demo1 equals equalsIgnoreCase ``` String strA = "mldn"; String strB = "MLDN"; System.out.println(strA.equals(strB)); System.out.println(strA.equal 阅读全文
posted @ 2023-06-06 22:22 盘思动 阅读(26) 评论(0) 推荐(0)
摘要: ``` public class HelloWorld { public static void main(String args[]){// String args[]字符串数组的意思 String str = "helloworld"; byte data[] = str.getBytes(); 阅读全文
posted @ 2023-06-06 22:09 盘思动 阅读(14) 评论(0) 推荐(0)
摘要: ### demo1 charAt ``` public class HelloWorld { public static void main(String args[]){// String args[]字符串数组的意思 String str = "www.baidu.com"; char c = 阅读全文
posted @ 2023-06-06 18:01 盘思动 阅读(19) 评论(0) 推荐(0)
上一页 1 ··· 23 24 25 26 27 28 29 30 31 ··· 133 下一页