打印三角形
public class Triangle {public static void main(String[] args){print(4);}static void print(int l){for(int i=1;i<=l;i++){for(int j=l-i;j>=0;j--){System.out.print(" ");}for(int j=i;j>0;j--){System.out.print("*");System.out.print(" ");}System.out.println("");}}}?