Write a Java program to print an American flag on the screen. Do it 2 ways: First, write all println statements in the main method and make sure your program works. Second, write it using static methods (and re-use repetitive lines by calling same method again) Expected Output * * * * * * ================================== * * * * * ================================== * * * * * * ================================== * * * * * ================================== * * * * * * ================================== * * * * * ================================== * * * * * * ================================== * * * * * ================================== * * * * * * ================================== ============================================== ============================================== ============================================== ============================================== ============================================== ==============================================
Write a Java program to print an American flag on the screen.
Do it 2 ways:
First, write all println statements in the main method and make sure your program works.
Second, write it using static methods (and re-use repetitive lines by calling same method again)
Expected Output
* * * * * * ==================================
* * * * * ==================================
* * * * * * ==================================
* * * * * ==================================
* * * * * * ==================================
* * * * * ==================================
* * * * * * ==================================
* * * * * ==================================
* * * * * * ==================================
==============================================
==============================================
==============================================
==============================================
==============================================
==============================================
Trending now
This is a popular solution!
Step by step
Solved in 7 steps with 5 images