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 |
Is a method a procedure?
What are the supported platforms by java programming language?
What are the drawbacks of reflection?
What are the advantages of exception handling?
what is object slice?
Does java list allow null?
List out five keywords related to exception handling ?
What are the 4 types of research methods?
What is the difference between array and arraylist? what is the difference between arraylist and linkedlist?
What is meant by stack and queue?
What are the types of inner classes (non-static nested class) used in java?
what is for datainputstream?