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 is the difference between integer parseint and integer valueof?
What string is utf8?
What are different ways of object creation in java ?
Explain the significance of class loaders in bootstrap?
What is argument in java?
What are the differences between stringbuffer and stringbuilder?
Explain the difference between extends thread vs implements runnable in java?
What are different types of inner classes ?
Can you use this() and super() both in a constructor?
What is an iterator java?
What is the difference between char and char *?
What are register variables what are the advantages?
What are the basic concepts of OOPS in java?
What is == mean?
What if I write static public void instead of public static void in java?