下列程序为什么会成为死循环?
package pa;import java.util.*;
public class Yu{
public static void main(String[] args){
Scanner s=new Scanner(System.in);
int a=s.nextInt();
int i,j;
for(i=1;i<=a;i++)
for(j=1;j<2*a-1;j++)
{
if(j<a-i)
{for(j=1;j<a-i;j++)
System.out.print(" ");}
if(j==a-i)
{for(j=a-i;j<2*a-1;j++)
System.out.print("*");}
if(j>a-i)
{for(j=a*a-2;j>a-i;j--)
System.out.print(" ");}
if(j==2*a-1)
{System.out.print(" ");
System.out.println();}
}
}
}