Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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



Hi friends i want display Triangle shap stars(*) please can tell me any one java code logic? ..

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

Hi friends i want display Triangle shap stars(*) please can tell me any one java code logic? ..

Answer / royal

Thanks Sadik............

Is This Answer Correct ?    4 Yes 0 No

Post New Answer

More Core Java Interview Questions

How do listeners work?

0 Answers  


Distinguish between a predicate and a function?

0 Answers  


What is a class object?

0 Answers  


What is the purpose of a default constructor?

0 Answers  


Explain the private protected method modifier?

0 Answers  


What is the relationship between clipping and repainting under awt?

0 Answers  


What is literal example?

0 Answers  


How does compareto method work?

0 Answers  


Why is prepared Statement, Callable Statement used for? What is the need of Batch updates?

1 Answers   Logica CMG,


What about main() method in java ?

0 Answers  


What is the difference between compiler and jvm?

0 Answers  


What is a boolean used for?

0 Answers  


Categories