java 将字符串里的字符逐个输出


class fuxi_2{
          publicstaticvoid main(String[] args){ 
          String s="hello";
          int j=s.length()-1;
          for(int k=0;k<=j;k++){   
//倒序输出时: for(int k=j;k>=0;k--){
System.out.println(s.charAt(k)); } } }

原文地址:https://www.cnblogs.com/demoworld/p/3318746.html