摘要:
String str6 = "hello"; String str7 = "HELLO"; System.out.println(str6.equalsIgnoreCase(str7)); //不区分大小写比较字符串的内容 阅读全文
posted @ 2020-07-13 17:58
一块
阅读(475)
评论(0)
推荐(0)
摘要:
String str5 = "293陕西力拓888"; System.out.println(str5.startsWith("293")); System.out.println(str5.endsWith("888")); if(str5.startsWith("293")) { System. 阅读全文
posted @ 2020-07-13 17:52
一块
阅读(1412)
评论(0)
推荐(0)
摘要:
String str3 = "helloworld"; System.out.println(str3.substring(3)); System.out.println(str3.substring(2, 8)); String[] arr = str3.split("ow"); for (Str 阅读全文
posted @ 2020-07-13 17:37
一块
阅读(450)
评论(0)
推荐(0)
摘要:
String str3 = "helloworld"; System.out.println(str3.substring(3)); System.out.println(str3.substring(2, 8)); String[] arr = str3.split("ow"); for (Str 阅读全文
posted @ 2020-07-13 17:34
一块
阅读(4717)
评论(0)
推荐(0)
摘要:
String str = " 好好学习,天天向上 "; System.out.println(str.charAt(5)); // 取出指定位置的字符 System.out.println("str的长度为:" + str.length()); // 取得一个字符串的长度 System.out.pr 阅读全文
posted @ 2020-07-13 17:28
一块
阅读(301)
评论(0)
推荐(0)
摘要:
public class StringAPIDemo1 { public static void main(String[] args) { String str = "HELLO"; char c[] = str.toCharArray(); // 将字符串变为字符数组 for (int i = 阅读全文
posted @ 2020-07-13 15:04
一块
阅读(1398)
评论(0)
推荐(0)

浙公网安备 33010602011771号