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
Why do we need hashset in java?
What is a numeric digit?
Explain spliterator in java8?
How to pass arraylist to stored procedure in java?
What is mean by encoding?
How many bytes is double?
What is externalizable interface?
Is space a character in java?
What is the difference between jvm and jre? What is an interface?
Write the algorithm to check the number non-leaf nodes in a tree.
What is the purpose of using break in each case of switch statement?
When should you make a function static?
What is the use of hashmap in java?
List some important features of java 10 release?
What is dot operator?