第2个回答 2016-10-17
public class Demo {
static int temp =0;
public static void main(String[] args) {
Demo d =new Demo();
d.printView();
}
public void printView(){
if(temp<=5){
for (int i = 0; i < 5-temp; i++) {
System.out.print("*");
}
System.out.println();
temp++;
printView();
}
}
}本回答被提问者采纳