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

How variables are stored in memory?

953


Can a method be static?

915


What are the practical benefits, if any, of importing a specific class rather than an entire package (e.g. Import java.net.* Versus import java.net.socket)?

1076


What is array class in java?

1007


Write a method that will remove given character from the string?

961


Do loops java?

961


What modifiers may be used with an inner class that is a member of an outer class in java programming?

1019


How to split a string in java?

1066


How many types of variables are there?

1080


Can we have try block without catch block?

985


What is early binding and late binding in java?

1099


Differentiate between the constructors and methods in java?

892


what is meant by HQL?

1011


What is executor memory?

889


What does nextint () do in java?

933