标签:
1 String str3 = new String("JhdhdFdeGDEmK"); 2 String str1 = str3.toUpperCase(); 3 String str2 = str3.toLowerCase(); 4 System.out.println(str1 + "\n" + str2); 5 6 System.out.println(); 7 8 String a1 = str1.substring(2, 3); 9 String a2 = str2.substring(3, 4); 10 if(a1.equalsIgnoreCase(a2) == true) 11 { 12 System.out.println("两个字串相同"); 13 } 14 else 15 { 16 System.out.println("两个字串并不相同"); 17 } 18 19 System.out.println(); 20 21 StringBuilder str = new StringBuilder("fgjk"); 22 int i = 1; 23 while(i <= 10) 24 { 25 str.append(i); 26 i++; 27 } 28 System.out.println(str);
标签:
原文地址:http://www.cnblogs.com/wgbs25673578/p/4870377.html