Constructing a square

Hey guys new to forum cause am in need of some help.
I have to draw a 'square' in java whose outline is all *'s and whose interior is filled with the character . (dot).
I did some coding but I only reached the point of just creating a complete square. What do I have to change in order for the task to work?


class Main
{
public static void main( String args[] )
{
System.out.print("#Input Square Size ");
int symbol = BIO.getInt();
int l = 1;
while (l <= symbol)
{
int stars = 1;
while (stars <= symbol)
{
int i = 1;
stars = stars + 1;
System.out.print("*");
}
System.out.println();
l = l + 1;
}
}
}
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories