*
***
******
********
******
***
* java编程
public class nullthing {
public static void main(String[] args) {
// TODO Auto-generated method stub
String line="*";
for(int i=0;i<6;i++){
System.out.println(line);
if(i<3){
line+="**";
}
else
{
line=line.substring(0,line.length()-2);
}
}
System.out.println(line);
}
}
可是打印出来的*个数不对。怎么解决呀?