qq_星尘_8
2016-12-29 21:10
public class HelloWorld29 {
public static void main(String[] args) {
// TODO Auto-generated method stub
StringBuilder str=new StringBuilder();
str.append("jaewkjldfxmopzxas");
int x=(str.length()/3)+str.length();
for(int i=3;i<x;i+=4)
str.insert(i,",");
System.out.print(str.toString());
}
}
for(int i=3;i<str.length();i=i+4){
str.insert(i,",");
}
我直接看了笔记,赞最多的那个了--
public static void main(String[] args) {
// TODO Auto-generated method stub
StringBuilder str=new StringBuilder();
str.append("jaewkjldfxmopzxas");
for(int i=3;i<str.length();i+3){
str.insert(i,",");
}
System.out.print(str.toString());
}
}
public static void main(String[] args) {
// TODO Auto-generated method stub
StringBuilder str=new StringBuilder();
str.append("jaewkjldfxmopzxas");
for(int i=str.length()-3;i>0;i-3){
str.insert(i,",");
}
System.out.print(str.toString());
}
}
Java入门第三季
409792 学习 · 4340 问题
相似问题