public class day_4_2 {
public static void main(String[] args) {
/*循环嵌套*/
/*
****
****
****
****
*/
for (int i = 1; i <= 4; i++) {
for (int j = 1; j <= 4; j++) {
System.out.print("*");
}
System.out.println("");
}
/*
*
**
***
****
*/
for (int i = 1; i <= 4; i++) {
for (int j = 1; j <= i; j++) {
System.out.print("*");
}
System.out.println();
}
}
}
标签:String,int,void,args,嵌套循环,public
From: https://www.cnblogs.com/wyj497022944/p/18061715