Hey Need Help Java Write Recursive Method S Supposed Display Hint Use Loop Q37213354

Hey, I need help on Java. I have to write arecursive method that’s supposed to display this.Hint: use a for loop

*****

****

***

**

*

!

!!

!!!

!!!!

!!!!!


Answer


import java.util.Scanner;public class RecursivePattern { public static void printLine(int n, char c) { if (n > 0) { System.out.print(c); printLine(n-1, c); } else { System.out.println();

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.