图:
public class ArrayTest2{
public static void main(String[] args){
char[][] a = new char[6][];
for(int i =0;i<6;i++){
a[i] = new char[i+1];
for(int j=0;j<=i;j++){
a[i][j] = '*';
}
}
for(int i=0;i<a.length;i++){
for(int j=0;j<a[i].length;j++)
System.out.print(a[i][j]);
System.out.println();
}
}
}