How to make star pattern in NetBeans

I need to create this(down is link) pattern in Java but i know just to make square.

Here is my code:

for (i = 1; i <= 10; i++) {

for (j = 1; j <= 10; j++) {

if (i == 1 || i == 10 || j == 1 || j == 10) {

System.out.print("#");

} else {

System.out.print(" ");

}

}

System.out.print("\n");

}

}

Pattern...

Read More »

By: StackOverFlow - Friday, 9 November

Related Posts