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 |
Where is core java used?
Is a method a function?
What is the purpose of checked and unchecked exceptions in JAVA?
How does remove work in java?
What are the advantages of assembly language?
What is a method in java?
which of tha following is not a thread safe class? a) ArrayList b)Vector c)HashTable d)None
What is the list interface in java programming?
solve (x-1)(x-9)=8;
3 Answers IBM, Manhattan, TCS,
What is difference between compatible and incompatible changes in serialization?
Why java is free from garbage values??
Can final class have constructor?