package 练习;
/*
* 需求:打印矩形
*/
public class printDraw {
public static void main(String[] args)
{
draw(4,4); //打印4行4列的矩形
}
public static void draw(int x,int y)
{
for(int i=0;i<x;i++)
{
for(int j=0;j<y;j++)
{
System.out.print("*");
}
System.out.println("");
}
}
}
/*
* 需求:打印矩形
*/
public class printDraw {
public static void main(String[] args)
{
draw(4,4); //打印4行4列的矩形
}
public static void draw(int x,int y)
{
for(int i=0;i<x;i++)
{
for(int j=0;j<y;j++)
{
System.out.print("*");
}
System.out.println("");
}
}
}