Hi friends i want display Triangle shap stars(*) please can
tell me any one java code logic?
*
***
*****
******* Like this
Answers were Sorted based on User's Feedback
Answer / sadikhasan palsaniya
public class Test{
public static void main(String var[]){
int c=1;
for(int i=1;i<=4;i++){
for(int k=4;k>=i;k--)
System.out.print(" ");
for(int j=1;j<=c;j++){
System.out.print("*");
}
System.out.println("");
c=c+2;
}
}
}
| Is This Answer Correct ? | 14 Yes | 5 No |
what is ejb? what is the importance of ejb?
What is a java developer salary?
What is final keyword?
What are the methods to rectify ambiguities in the interfaces in JAVA?
What is “try and catch” in java
What is identifier give example?
How is string immutable in java?
What are the advantages of inner classes?
we cannot create an object of interface but we can create a variable of it
What is namespace in java?
Which non-unicode letter characters may be used as the first character of an identifier?
What do you mean by platform independence? What is an interface?