黑马程序员技术交流社区

标题: 遍历获取字符串的每个字符 [打印本页]

作者: 三川草民    时间: 2015-10-12 19:41
标题: 遍历获取字符串的每个字符
  1. public class StringTest2 {
  2.         public static void main(String[] args) {
  3.                 String s1="helloworld";
  4.                 for(int x=0;x<s1.length();x++){
  5.                         System.out.print(s1.charAt(x));
  6.                 }
  7.         }
  8. }
复制代码

作者: Jared    时间: 2015-10-12 19:43
大神 好多黑马币和技术分啊





欢迎光临 黑马程序员技术交流社区 (http://bbs.itheima.com/) 黑马程序员IT技术论坛 X3.2