java_函数手册_String_1.1_charAt_提取指定字符串

 1 package calssString;
 2 
 3 public class charAt___1_1 {
 4     public static void main(String []args){
 5         /**
 6          * public char charAt(int index)
 7          * 入口参数:index 是char的索引值
 8          */
 9         String strCom = "I LIKE JAVA";
10         char strLower = strCom.charAt(4);
11         System.out.println(strLower);
12 
13         String strCom1 = "我喜欢写代码!哈哈假的。";
14         char strLower1 = strCom1.charAt(4);
15         System.out.println(strLower1);
16     }
17 }

 

posted @ 2018-03-24 11:11  alm  阅读(166)  评论(0编辑  收藏  举报