Tahir khan class ReverseHollow { public static void main(String args[]) { int i,j; for(i=1;i<=5;i++) { for(j=1;j<=9;j++) { if(i==1 || j==i || j==10-i) { System.out.print("*"); } else { System.out.print(" "); } } System.out.println( ); } } } Log in to Reply
class ReverseHollow
{
public static void main(String args[])
{
int i,j;
for(i=1;i<=5;i++)
{
for(j=1;j<=9;j++)
{
if(i==1 || j==i || j==10-i)
{
System.out.print("*");
}
else
{
System.out.print(" ");
}
}
System.out.println( );
}
}
}