Question: Can someone check my Java code please? For some reason my output keeps looking like [see image] Why does the first * keep jarring to
Can someone check my Java code please?
For some reason my output keeps looking like [see image]
Why does the first * keep jarring to the right? Please help, how do I get it to line up? Code is below, thank you.

import java.util.*;
public class Recursion
{
public static void getPins(int numRows, int totalRows)
{
if(numRows == 1)
{
System.out.print("\t\t");
for(int i = 1; i
System.out.print(" ");
System.out.println("*");
}
else
{
System.out.print("\t\t");
getPins(numRows - 1, totalRows);
for(int i = 1; i
System.out.print(" ");
for(int i = 1; i
System.out.print("* ");
System.out.println();
}
}
@SuppressWarnings("resource")
public static void main(String args[])
{
Scanner scan = new Scanner(System.in);
System.out.print("Enter number of rows of pins to set up:");
int num = scan.nextInt();
getPins(num, num);
}
}
__________________________
I want it to look like...
![keeps looking like [see image] Why does the first * keep jarring](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f3dfdc61897_58866f3dfdc0c61f.jpg)
Console X
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
