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 are the four pillars of java?
What are the principle concepts of oops?
Differentiate between stringbuffer and string?
What is array sorting in java?
Explain what is Marker interface?
When do we need to use internal iteration? When do we need to use external iteration?
What is the difference between java applets and applications?
Can we convert stringbuilder to string in java?
What classes of exceptions may be thrown by a throw statement?
How do you identify if jvm is 32-bit or 64-bit from java program?
What is set string?
What is a double vs float?
What is java jit compilers?
What are the 4 versions of java?
23. Storage space in java is of the form Stack Queue Heap List 24. What is java code embedded in a web page known as Applets Servlets scriptlets snippets 25. Which of the following attributes are compulsory with an