1. 程式人生 > >java_函數手冊_String_1.2_codePointAt_提取索引字符代碼點

java_函數手冊_String_1.2_codePointAt_提取索引字符代碼點

ati ring pub info pac cal alt bsp java

 1 package calssString;
 2 
 3 public class codePointAt___1_2 {
 4     public static void main(String []args){
 5         /**
 6          * 返回指定索引處的字符代碼
 7          */
 8 
 9         String strCom = "I LIKE JAVA";
10         int strLower = strCom.codePointAt(8);
11         System.out.println(strLower);
12 13 strCom = "I LIKE J愛VA"; 14 strLower = strCom.codePointAt(8); 15 System.out.println(strLower); 16 17 strCom = "I LIKE J1VA"; 18 strLower = strCom.codePointAt(8); 19 System.out.println(strLower); 20 } 21 }

技術分享圖片

java_函數手冊_String_1.2_codePointAt_提取索引字符代碼點