for(i=3;i>=0;i--) { for(j=1;j<=i;j++) System.out.print(" "); for(j=1;j<=7-2*i;j++) //我不喜欢这种写法 System.out.print("*"); System.out.println(""); }