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
What does function identity () do?
I don’t want my class to be inherited by any other class. What should I do?
Difference between serialization and deserialization in java?
What are the drawbacks of reflection?
What data structures are used to perform recursion?
What are void pointers?
What is the difference between stringbuffer and stringbuilder class?
What are the types of strings?
What is string and its types?
In which language java is written?
What is the default access specifier for variables and methods of a class?
What are the important methods of java exception class?
Which class should you use to obtain design information about an object in java programming?
Does treeset allow null in java?
What is a boolean in java?