[Java] 取出字符串中第n个字符 →→→→→进入此内容的聊天室

来自 , 2020-08-16, 写在 Java, 查看 109 次.
URL http://www.code666.cn/view/fba9d881
  1. public class StringAPIDemo02{  
  2.     public static void main(String args[]){  
  3.         String str1 = "hello" ;         // 定义String对象  
  4.         System.out.println(str1.charAt(3)) ;    // 取出字符串中第四个字符  
  5.     }  
  6. };  
  7.  
  8. //源代码片段来自云代码http://yuncode.net
  9.                        

回复 "取出字符串中第n个字符"

这儿你可以回复上面这条便签

captcha