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