你要的效果是不是123456
12345
1234
123
12
1
part of the code:
for(int i=0;i (more...)
what about this?
String s="123456";
for(int i=0; i<6; i++){
System.out.println(s);
s=" "+s;
s=s.substring(0, s.length()-1);
}
^&*
for(int i=0; i<6; i++){
System.out.println(s);
s=" "+s;
s=s.substring(0, s.length()-1);
}
^&*