private static void rhombFuncation() {
int row = 3;
for (int i = 1; i <= row; i++) {
for (int row1 = row; row1 > i; row1--) {
System.out.print("-");
}
for (int j = 0; j < i; j++) {
System.out.print("*");
}
if (i != 1){
for (int j = 1; j <= i -1 ; j++) {
System.out.print("*");
}
}
for (int row1 = row; row1 >i; row1--) {
System.out.print("-");
}
System.out.println();
}
for (int i = row -1 ; i > 0; i--) {
for (int j = 0; j < row - i ; j++){
System.out.print("-");
}
for (int j = i -1; j >= 0 ; j--) {
System.out.print("*");
}
for (int j = i -1; j >=1; j--) {
System.out.print("*");
}
for (int j = 0; j < row -i; j++) {
System.out.print("-");
}
System.out.println();
}
}
----*---- ---***--- --*****-- -*******- ********* -*******- --*****-- ---***--- ----*----
标签:输出,java,row1,int,System,--,print,控制台,out From: https://www.cnblogs.com/eternality/p/17469080.html