Can you please check following code to print the pattern using recursion: Is this fine ? or the signature of the function should be like the shown in the video ?
public static void pattern (int n) {
if(n==0) {
return ;
}
int i = 1;
pattern(n-1);
for(i=1;i<=n;i++) {
System.out.print("*");
}
System.out.println("");
}