Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

how to print the below in java?thanks in advance....
*
* *
* *
* *
*

Answer Posted / jitendra

for(i=1;i<=3;i++)
{
for(j=3;j>=i;j--)
System.out.printf(" ");
System.out.printf("*");
for(j=1;j<2+i;j++)
System.out.printf(" ");
System.out.printf("*");
System.out.printf("\n");
}
this is to print
*
* *
* *
now apply ur brain to print the rest...
any problem ..then mail me
jitendrasharma13@gmail.com

Is This Answer Correct ?    2 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between integer parseint and integer valueof?

998


What string is utf8?

993


What are different ways of object creation in java ?

1074


Explain the significance of class loaders in bootstrap?

943


What is argument in java?

1013


What are the differences between stringbuffer and stringbuilder?

1056


Explain the difference between extends thread vs implements runnable in java?

1126


What are different types of inner classes ?

1045


Can you use this() and super() both in a constructor?

978


What is an iterator java?

1100


What is the difference between char and char *?

1073


What are register variables what are the advantages?

899


What are the basic concepts of OOPS in java?

1032


What is == mean?

996


What if I write static public void instead of public static void in java?

1089