Write a Java application using iteration that displays two (2) of the following
ID: 3622812 • Letter: W
Question
Write a Java application using iteration that displays two (2) of the following patterns separately, one below the other. Use for loops to generate the patterns. All asterisks (*) should be displayed by a single statement of the form System.out.print( '*' ); which causes the asterisks to display side by side with a space between each asterisk. A statement of the form System.out.println(); can be used to move to the next line. A statement of the form System.out.println( ' ' ); can be used to display a space for the last two patterns. There should be no other output statements in the application.1. *
* *
* * *
* * * *
* * * * *
* * * * * *
2. * * * * * *
* * * * *
* * * *
* * *
* *
*
3. *
* *
* * *
* * * *
* * * * *
* * * * * *
4. * * * * * *
* * * * *
* * * *
* * *
* *
*
Explanation / Answer
public class Aster { public static void main(String args[]) { // part A for (int i = 1; iRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.