Question: Write an application that displays a checkerboard pattern, as follows:
Note that this program can also be written using eight System.out.println statements.
1 2 3 4 5 6 7 8 9 |
public class CheckerboardPatternOfAsterisks { public static void main (String [ ] args) { System.out.print("********\n ********\n********\n ********\n" + "********\n ********\n********\n ********\n"); } } |
Note that this program can also be written using eight System.out.println statements.
Click here to see other answers to Java How to Program. You can also click here to see the same program in C.
1 Comment
Thanks! awesome